使用H5+CSS3实现心形

<style>
        .heart{
            width: 200px;
            height: 300px;
            margin: 100px auto;
            position: relative;
        }
        .heart::before,.heart::after{
        content: "";
        width: 100%;
        height: 100%;
        position: absolute;    
        background-color: red;
        left: 0;
        top: 0;
        border-radius: 100px 100px 0 0;
        transform: rotate(-45deg);
        }
        .heart::after{
            left: 71 px;
            background-color: red;
            transform: rotate(45deg);
        }
    </style>

<div class="heart">
        
        </div>

                                  本文只是学习笔记,不做商业用途

猜你喜欢

转载自blog.csdn.net/weshouldhelp/article/details/82012887