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

css3画三角形

时间:2015-09-15 12:45:34      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:

以下是用css3画3角形,效果如下图

技术分享

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
    span{ display:inline-block; margin-right:10px}    
    .triangle_top{height:0;width:0; border:10px solid;  border-color:transparent  transparent red transparent;}
    .triangle_left{height:0;width:0; border:10px solid;  border-color:transparent  red transparent transparent;}
    .triangle_right{height:0;width:0; border:10px solid; border-color:transparent transparent transparent  red;}
    .triangle_bottom{height:0;width:0; border:10px solid;  border-color:red transparent transparent transparent;}
</style>
</head>

<body>
<span class="triangle_top"></span>
<span class="triangle_left"></span>
<span class="triangle_right"></span>
<span class="triangle_bottom"></span>
</body>
</html>

 

css3画三角形

标签:

原文地址:http://www.cnblogs.com/zhouyuxiang/p/4809683.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!