css制作圣诞树

没事干,用css画一个圣诞树

<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//en" "http://www.w3. org/TR/html4/strict.dtd">
<head>
    <meta name="content-type" content="text/html; charset=utf-8">
    <title>圣诞树</title>
    <style>
        #content{
            height:680px;
            background:black;
        }
/*树叶*/        
        .tri{
            0px;
            height:0px;
            border-style:solid;
            border-50px;
            border-top-0px;
            border-color:green transparent;
            margin:auto;
        }
        .tri1{
            border-50px;
            border-top-0px;
        }
        .tri2{
            border-100px;
            border-top-0px;
        }        
        .tri3{
            border-150px;
            border-top-0px;
        }
/*树干*/
        #rectangle{
            90px;
            height:150px;
            background:#CC9900;
            margin:auto;
        }
    </style>
</head>
<body>
    <div id="content">
        <div class="tri tri1"></div>
        <div class="tri tri2"></div>
        <div class="tri tri3"></div>
        <div id="rectangle"></div>
    </div>
</body>

 冷静,坚持

原文地址:https://www.cnblogs.com/drl937676516/p/3843381.html