我有一些 CSS,它在 Windows 上运行良好,但是当我在 OSX 上查看它时,它并不完全正确。
这就是它应该看起来的样子,太棒了:
这就是 OSX 上的 Firefox 15 显示它的方式:
CSS:
nav#main ul>li.current {
height: 59px;
}
nav#main ul>li.current:before {
background: url('../img/top_shadow.png') no-repeat;
content: '';
display: block;
height: 7px;
margin: -7px 0 0 0;
}
nav#main ul>li.current:after {
background: url('../img/bottom_shadow.png') no-repeat;
content: '';
display: block;
height: 7px;
margin: 8px 0 0 0;
}
nav#main ul>li.current a {
background-color: #77b9de;
color: #3e3e3e;
height: 53px;
margin: -4px 3px -8px -3px;
padding: 3px 3px 0 10px;
}
关于为什么会发生这种情况的任何想法?我还应该指出,如果我将背景颜色移动到<li>
而不是<a>
它仍然会做同样的事情。
我将它的快速版本添加到 jsfiddle 以查看整个代码的外观。