我在dynamic drive找到了这个菜单。这是使用CSS三角形技术实现的。现在我需要编辑基于图像的这个。我的意思是替换图片背景,而不是LI中心的CSS三角形技术。HTML:
<ul class="arrowunderline">
<li><a href="http://www.dynamicdrive.com">Home</a></li>
<li><a href="http://www.dynamicdrive.com/new.htm">New</a></li>
<li class="selected"><a href="http://www.dynamicdrive.com/revised.htm">Revised</a></li>
<li><a href="http://tools.dynamicdrive.com">Tools</a></li>
<li><a href="http://tools.dynamicdrive.com/style/">CSS</a></li>
<li><a href="http://www.dynamicdrive.com/forums/">Forums</a></li>
</ul>CSS:
ul.arrowunderline{
list-style-type:none;
margin:0;
padding:0;
text-align:center; /* enter "left", "right", or "center" to orient the menu accordingly */
font: bold 16px Georgia;
}
ul.arrowunderline li{
display:inline;
margin-right:25px; /* spacing between each menu item */
}
ul.arrowunderline li a{
position:relative;
color:black;
padding-bottom:8px; /*spacing between each menu item and arrow underline beneath it */
text-decoration:none;
}
ul.arrowunderline li a:hover{
border-bottom:3px solid purple; /* style of arrow underline */
}
ul.arrowunderline li a:hover:after{ /* use CSS generated content to add arrow to the menu */
content:'';
width:0;
height:0;
position:absolute;
left:50%;
margin-left:-5px; /* value should match border-width below */
bottom: 0;
border-width:5px; /* value should match margin-left above */
border-style:solid;
border-color: transparent transparent purple transparent; /* create up arrow */
}镜像替换为:

也许我就是这样工作的。有没有更好的方法?另一种方式!
谢谢你的帮助。
发布于 2012-03-06 17:38:47
在a:hover:after中给出你的图片而不是边框。
发布于 2012-03-06 17:16:37
用你的图片替换了css三角形!
https://stackoverflow.com/questions/9580636
复制相似问题