Navigation Panel
SEO Help and Tips
Navigation Panel Colorful
Here's the navigation panel code:
Python:
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)
html:
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Colorful Navigation Panel</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px 0;
}
nav {
display: flex;
background-color: #f4f4f4;
}
.menu-item {
flex: 1;
padding: 15px;
text-align: center;
cursor: pointer;
transition: background-color 0.3s, transform 0.2s;
background-color: #3498db; /* Blue color */
color: #fff;
}
.menu-item:hover {
background-color: #2980b9; /* Darker blue color on hover */
transform: scale(1.05);
}
.active {
background-color: #e74c3c; /* Red color for active item */
font-weight: bold;
}
</style>
</head>
<body>
<header>
<h1>My Website</h1>
</header>
<nav>
<a href="#" class="menu-item">Home</a>
<a href="#" class="menu-item">About Us</a>
<a href="#" class="menu-item">Services</a>
<a href="#" class="menu-item">Portfolio</a>
<a href="#" class="menu-item active">Contact</a>
</nav>
</body>
Comments
Post a Comment
Thanks for your Comments.