
在CSS中我使用无需列表做导航栏,怎么让导航栏向图片的右边缘对齐?然后鼠标滑过要变颜色?
<styletype="text/css">body{margin:0;margin-top:6px;}#menu{margin:auto}ul{list-style-t...
<style type="text/css">
body {
margin:0;
margin-top:6px;
}
#menu{
margin:auto
}
ul{
list-style-type: none;
text-align:right;
}
li{float:right;}
a{
display: block;
font-size: 12px;
text-decoration: none;
padding-top: 10px;
height: 30px;
width: 80px;
text-align:center;
background-color: #CC99FF;
}
</style> 展开
body {
margin:0;
margin-top:6px;
}
#menu{
margin:auto
}
ul{
list-style-type: none;
text-align:right;
}
li{float:right;}
a{
display: block;
font-size: 12px;
text-decoration: none;
padding-top: 10px;
height: 30px;
width: 80px;
text-align:center;
background-color: #CC99FF;
}
</style> 展开
1个回答
展开全部
先设置一个大盒子div,然后在里面设置导航栏和图片盒子用float浮动
a:hover {
display: block;
font-size: 12px;
text-decoration: none;
padding-top: 10px;
height: 30px;
width: 80px;
text-align:center;
background-color: #fff}
a:hover {
display: block;
font-size: 12px;
text-decoration: none;
padding-top: 10px;
height: 30px;
width: 80px;
text-align:center;
background-color: #fff}

2025-02-10 广告
可视化标签产品应用行业:汽车零部件,汽车电子、新能源三电、医疗器械、3C、家电制造、食品/饮料/包装、AGV、机械制造、光伏、半导体、仓储物流等领域。广州晨控智能技术有限公司(简称“晨控智能”)创立于2011年,是一家集研发、生产与销售一体...
点击进入详情页
本回答由晨控智能提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询