码迷,mamicode.com
首页 > Web开发 > 详细

css 画三角形

时间:2015-01-28 17:25:48      阅读:169      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!