好它采取了一些做什么,但我想我要给你一个开始:
http://jsfiddle.net/uLDzA/2/
这里的主要问题是,你不能只是设置的箭头,透明的,因为菜单的div将有某种纯色的,不会让透明流血通过对主要背景。
我解决了这个问题,把菜单项放到顶部和底部。顶部有文本,底部是构建好的,以便我们在中间部分“模拟”一个三角形并给它一个透明的背景。
基本上通过将它拼凑成CSS拼图,将箭头构建到菜单项本身中。
<div class="con">
<div class="item">
<div class="item_top">
top
</div>
<div class="item_btm">
<div class="item_btm_lft"> </div>
<div class="item_btm_ptr"> </div>
<div class="item_btm_rgt"> </div>
</div>
</div>
</div>
.con {
width:100px;
height:40px;
padding:20px;
background:url('http://placekitten.com/g/100/100');
}
.item {
width:100px;
background:transparent;
}
.item_top {
background:orange;
text-align:center;
color:#fff
}
.item_btm {
width:100%;
overflow:hidden;
}
.item_btm_lft {
width:40px;
float:left;
background:orange;
border-bottom:2px solid orange;
}
.item_btm_ptr {
width: 0px;
height: 0px;
float:left;
border-style: solid;
border-width: 0 10px 20px 10px;
border-color: transparent orange transparent orange;
}
.item_btm_rgt {
width:40px;
float:left;
background:orange;
border-bottom:2px solid orange;
}
认为这是最好的解决办法!谢谢 :) – LeFauko 2013-04-09 16:24:56