【发布时间】:2011-10-02 02:19:57
【问题描述】:
我在菜单项旁边有一个三角形,使用纯 CSS。它在 Internet Explorer 和 Firefox 中完美运行,但 Chrome 裁剪了箭头的底部。以下是问题的一些截图:
这是我正在使用的 CSS:
/*menu arrows */
.arrowsprite {
width:0px;
height:0px;
border-left:5px solid transparent;
border-right:5px solid transparent;
border-top:5px solid #444444;
font-size:0px;
line-height:0px;
top:-2px;
position:relative;
}
.arrowspriteselected {
width:0px;
height:0px;
border-left:5px solid transparent;
border-right:5px solid transparent;
border-top:5px solid #fff;
font-size:0px;
line-height:0px;
top:-2px;
position:relative;
}
.leftish li:hover .arrowsprite {
border-top:5px solid #444444;
}
.leftish li:hover .arrowspriteselected {
border-top:5px solid #444444;
}
HTML 是:
<li>Wanted <span class="arrowsprite"></span></li>
有人发现我的 CSS 中有任何明显的问题吗?
【问题讨论】:
-
我知道问题已经得到解答,但您是否考虑过使用 Unicode 字符(U+25BC 黑色向下三角形,或 U+25BE 黑色向下小三角形)?
标签: css