1.可以用css3的border-radius属性来实现,支持ie9+
<div class="dm"></div>
<div class="dm1">
</div>
<div class="dm2">
</div>
<div class="dm3">
</div>
<div class="dm4">
</div>
<div class="dm5">
</div>
<div class="dm6">
</div>
<div class="dm7">
</div>
<style>
.dm {
width: 0
height: 0
border-left: 50px solid transparent
border-right: 50px solid transparent
border-bottom: 100px solid #00897B
}
.dm1{
width: 0
height: 0
border-left: 50px solid transparent
border-right: 50px solid transparent
border-top: 100px solid #00897Bmargin-top: 20px
}
.dm2{
width: 0
height: 0
border-top: 50px solid transparent
border-right: 100px solid #00897B
border-bottom: 50px solid transparentmargin-top: 20px
}
.dm3{
width: 0
height: 0
border-top: 50px solid transparent
border-left: 100px solid #00897B
border-bottom: 50px solid transparentmargin-top: 20px
}
.dm4{
width: 0
height: 0
border-top: 100px solid #00897B
border-right: 100px solid transparentmargin-top: 20px
}
.dm5{
width: 0
height: 0
border-top: 100px solid #00897B
border-left: 100px solid transparent margin-top: 20px
}
.dm6{
width: 0
height: 0
border-bottom: 100px solid #00897B
border-right: 100px solid transparent
}
.dm7{
width: 0
height: 0
border-bottom: 100px solid #00897B
border-left: 100px solid transparent
}
</style>
使鼠标经过显示 css3 绘图三角形参考下面方法:<a class="tooltips" href="#tooltips">这就是Tooltips<span>这些附加的说明文字在鼠标经过的时候显示。
</span></a>
<style type="text/css">
/*Tooltips*/
.tooltips{
position:relative/*这个是关键*/
z-index:2
}
.tooltips:hover{
z-index:3
background:none/*没有这个在IE中不可用*/
}
.tooltips span{
display: none
}
.tooltips:hover span{ /*span 标签仅在 :hover 状态时显示*/
display:block
position:absolute
top:21px
left:9px
width:15em
border:1px solid black
background-color:#ccFFFF
padding: 3px
color:black
}
</style>