小三角

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .triangle{
            width: 247px;
            height: 55px;
            position: relative;
            text-align: center;
            line-height: 55px;
            background-color: #FFD200;
            margin: 0 auto;
            
        }
        .triangle::after{
            display: block;
            width: 0;
            height: 0;
            border-left: 7px solid transparent;
            border-right: 7px solid transparent;
            border-top: 8px solid #FFD200;
            position: relative;
            left: 50%;
            margin-left: -7px;
            visibility: visible;
            content: "";
            top: 55px;
        }
    </style>
</head>
<body>
    <div class="triangle"></div>

</body>
</html>

posted @ 2019-05-30 14:32  硕果累累~  阅读(441)  评论(0编辑  收藏  举报