清风细雨楼 Design By www.eepep.com

图:
CSS模拟小箭头的实现代码
HTML代码:

复制代码代码如下:
<div class="pre-wrap">
<div class="pre">
<div class="pre1"></div>
<div class="pre2"></div>
</div>
</div>

CSS代码:

复制代码代码如下:
.pre-wrap {
width: 200px;
height: 120px;
margin: 50px auto 0;
border: 2px solid #F00;
border-radius: 4px;
position: relative;
}
.pre {
width: 80px;
height: 80px;
position: absolute;
top: 20px;
left: 40px;
}
.pre1 {
border-width: 40px;
border-color: transparent #F30 transparent transparent;
}
.pre2 {
border-width: 40px;
border-color: transparent #FFF transparent transparent;
position: relative;
top: -80px;
left: 15px;
}
.pre1, .pre2 {
/*****设置border-style:dashed;使ie6支持border透明*****/
border-style: dashed solid dashed dashed;
/*****设置容器宽高为0*****/
width: 0;
height: 0;
/*****去掉ie6下默认高度,设置以下属性*****/
line-height: 0;
font-size: 0;
overflow: hidden;
}

清风细雨楼 Design By www.eepep.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
清风细雨楼 Design By www.eepep.com