画倒三角

 

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father{
            border-color: red;
            border-width: 2px;
            border-style: solid;
            margin: 0 auto;
            margin-top: 50px;
            height: 200px;
            width: 400px;
        }
        .father .child{
            margin: 0% auto;
            margin-top: 10%;
            width: 0px;
            height: 0px;          
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
            border-top: 60px solid red;
        } 
    </style>
</head>
<body>
    <div class="father">
        <div class="child"></div>
    </div>
</body>
</html>

 

posted @ 2021-04-21 17:04  Sherlockmmc  阅读(60)  评论(0编辑  收藏  举报