首页 > 代码库 > 绘制三角形,梯形

绘制三角形,梯形

<!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

绘制三角形,梯形