码迷,mamicode.com
首页 > 其他好文 > 详细

绘制三角形,梯形

时间:2016-11-24 16:14:30      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:display   三角形   

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        body{
            margin: 100px;
        }
        .span1{
            display: inline-block;
            border-left: 60px solid darkorange;
            border-top: 50px solid  transparent;
            border-bottom: 50px solid  transparent;
        /*<!--transparent使border透明,只保留挤压效果-->*/
            width: 0px;
            height: 0px;

        }
        .span2{
            display: inline-block;
            border-left: 50px solid darkorange;
            border-top: 50px solid  orange;
            border-bottom: 50px solid  fuchsia;
            border-right:  50px solid  green;
            width: 0px;
            height: 0px;

        }
        .span3{
            background-color: blue;
            display: inline-block;
            border-left: 50px solid darkorange;
            border-top: 50px solid  orange;
            border-bottom: 50px solid  fuchsia;
            border-right:  50px solid  green;
            width: 40px;
            height: 40px;
        }


       


       
    </style>
</head>
<body>
    <span class="span1">

    </span>
 <span class="span2">

    </span>

<span class="span3">

    </span>
   


   
</body>
</html>

技术分享

本文出自 “matengbing” 博客,请务必保留此出处http://matengbing.blog.51cto.com/11395502/1876127

绘制三角形,梯形

标签:display   三角形   

原文地址:http://matengbing.blog.51cto.com/11395502/1876127

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