首页 > Web开发 > 详细

css 画三角形

时间:2015-01-28 17:25:43      阅读:377      评论:0      收藏:0      [点我收藏+]

<div class="tips"></div>

.tips{

position: relative;

border: 1px solid #aaa;

}

.tips:before{

content: "";
position: absolute;
border-style: solid;
/* reduce the damage in FF3.0 */
display: block;
width: 0;
top: -7px; /* value = - border-top-width - border-bottom-width */
left: 28px; /* controls horizontal position */
bottom: auto;
border-width: 0 9px 7px; /* vary these values to change the angle of the vertex */
border-color: #666 transparent;

}

.tips:after{

content: "";
position: absolute;
border-style: solid;
/* reduce the damage in FF3.0 */
display: block;
width: 0;
top: -5px; /* value = - border-top-width - border-bottom-width */
left: 30px; /* controls horizontal position */
bottom: auto;
border-width: 0 7px 5px; /* vary these values to change the angle of the vertex */
border-color: #fff transparent;

}

css 画三角形

原文:http://www.cnblogs.com/zxy562323273/p/4256171.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!