css - 想让border向上移动1px margin-bottom:-1px不好使
本文介绍了css - 想让border向上移动1px margin-bottom:-1px不好使的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
请输入代码
#nav {
width: 100%;
height: .5rem;
background: #eee;
font-size: .18rem;
}
#nav ul {
/* list-style: none;*/
padding: 0;
margin: 0;
}
#nav ul li {
width: 24%;
height: .5rem;
display: inline-block;
line-height: .5rem;
text-align: center;
}
#nav ul li.active {
color: #0099FF;
border-bottom: 1px solid #0099FF;
margin-bottom: -1px;
}
解决方案
不太理解你的需求,你用position试试
这篇关于css - 想让border向上移动1px margin-bottom:-1px不好使的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文