css3写平行四边形

<html>

    <head>
        <meta charset="UTF-8">
        <title>平行四边形</title>
        <style type="text/css">
           
            .skew {
                 100px;
                height: 73px;
                background: #f0eb4f;
                margin: 0 auto;
                text-align: center;
                transform: skew(15deg);
                box-shadow: 2px 3px 5px #a7a0a0;
            }
            
            .skew-main {
                transform: skew(-15deg);
            }
        </style>
    </head>

    <body>
        <div class="skew">
            <div class="skew-main">平行四边形</div>
        </div>
    </body>

</html>

结果如图所示:

原文地址:https://www.cnblogs.com/150536FBB/p/11645786.html