我有一个子导航,在每个子菜单项下都有一个下边框,当我检查它是否在所有浏览器中都正常时,我注意到下边框在 IE7 文本结束的地方停止。
这是我的 CSS
.subnav_wrapper_ul {
background: none repeat scroll 0 0 #00AEEF;
font-size: 13px !important;
position: absolute;
top: 34px;
z-index: 1000;
}
.header-wrapper .main-nav li {
float: left;
list-style: none outside none;
position: relative;
white-space: nowrap;
z-index: 1000;
}
.subnav_wrapper_ul li {
border-bottom: 1px dotted #FFFFFF;
float: none !important;
padding: 0;
width: 100%;
}
如果您还有其他需要我提供的其他事情,请告诉我
将边框底部的 css 属给 ul 元素,而不是单个 li 项。
.subnav_wrapper_ul {
background: none repeat scroll 0 0 #00AEEF;
font-size: 13px !important;
position: absolute;
top: 34px;
z-index: 1000;
border-bottom: 1px dotted #FFFFFF;
}
我们没有任何链接或任何图像可供参考,所以在这种情况下,我们都必须猜测。
无论如何,您正在谈论子菜单部分。 我们可以在这里使用IE7特定的黑客吗?
*:first-child+html .subnav_wrapper_ul li {
border-bottom: 1px dotted #FFFFFF;
float: none !important;
padding: 0;
width: 100%;
}
面向 IE7 的另一种方法是:
*border-bottom: 1px dotted #FFFFFF;