1. <!DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    7. <title>Document</title>
    8. <style>
    9. /* 圆角 */
    10. div{
    11. width: 400px;
    12. height: 400px;
    13. background-color: blueviolet;
    14. border-radius: 20px;
    15. margin: 0 auto;
    16. /* 阴影 */
    17. box-shadow: 0,10px,40px,rgba(10, 10, 10, 0.5);
    18. }
    19. </style>
    20. </head>
    21. <body>
    22. <div ></div>
    23. </body>
    24. </html>
    <!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>
            /* 动画效果 */
            div{
                width: 200px;
                height: 200px;
                background-color: red;
                animation: myAnim 3s linear 0s infinite;
            }
            div:hover{
                animation-play-state: paused;
            }
    
            @keyframes myAnim{
               0%{
                   background-color: red;
               } 
               50%{
                   background-color: green;
               }
               100%{
                   background-color: red;
               }
            }
        </style>
    
    </head>
    <body>
        <div></div>
    </body>
    </html>
    
    <!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>
            /* 呼吸灯效果 */
            .box{
                width: 300px;
                height: 300px;
                margin: 40px auto;
                background-color: aquamarine;
                border-radius: 5px;
                box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
                animation: breathe 3s ease-in-out infinite alternate;
            }
    
            @keyframes breathe {
                0%{
                    opacity: 0.2;
                    box-shadow: 0 1px 2px rgba(rgb(83, 58, 58), green, blue, 0.1) ;
                }
                50%{
                    opacity: 0.5;
                    box-shadow: 0 1px 2px rgba(rgb(104, 151, 145), green, blue, 0.76);
                }
                100%{
                    opacity: 1;
                    box-shadow: 0 1px 2px rgba(rgb(158, 203, 46), green, blue, 1);
                }
            }
        </style>
    
    </head>
    <body>
        <div class="box"></div>
    </body>
    </html>