预览图
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>网站导航栏</title>
<style>
.div
{
height: 25px;
width: 100%;
background-color: azure;
text-align: right;
text-decoration: none;
}
.a{
text-decoration: none;
width: 100px;
height: 50px;
text-align: center;
background-color: green;
line-height: 50px;
color:white;
display: inline-block;
}
a:hover{
color: red;
color:#F0F8FF
}
.text
{
text-decoration: none;
}
.logo,.text
{
float: left;
}
</style>
</head>
<body>
<div class="div">
<div class="logo"><img src="../image.png"></div>
<div id="text">
<a href="#">首页</a>
<a href="#">商品</a>
<a href="#">分类</a>
<a href="#">会员</a>
<a href="#">售后</a>
</div>
</div>
</body>
</html>