通过css来画出一颗桃心

    1. #heart {
    2. width: 100px;
    3. height: 80px;
    4. position: relative;
    5. }
    6. #heart:after {
    7. content: "";
    8. width: 50%;
    9. height: 80px;
    10. background: red;
    11. position: absolute;
    12. left: 50%;
    13. border-radius: 25px 25px 0 0;
    14. transform-origin: 0 100%;
    15. transform: rotate(-45deg);
    16. }
    17. #heart:before {
    18. content: "";
    19. width: 50%;
    20. height: 80px;
    21. background: red;
    22. position: absolute;
    23. left: 0%;
    24. border-radius: 25px 25px 0 0;
    25. transform-origin: 100% 100%;
    26. transform: rotate(45deg);
    27. }