1、圆角:

    1. <style>
    2. div{
    3. width: 100px;
    4. height: 100px;
    5. border: 1px solid #000;
    6. position: absolute;
    7. left: calc(50% - 50px);
    8. top: calc(50% - 50px);
    9. /* border-radius */
    10. border-radius: 10px 20px 30px 40px;
    11. /* 每个角的写法: */
    12. border-top-left-radius: 10px;
    13. border-top-right-radius:20px;
    14. border-bottom-right-radius:30px;
    15. border-bottom-left-radius:40px;
    16. border-radius: 50%;/* 正圆 */
    17. /* 第三种写法: */
    18. border-radius: 10px 20px 30px 40px / 10px 20px 30px 40px;
    19. /* 左/上,右/上,水平方向 */
    20. }
    21. </style>
    22. </head>
    23. <body>
    24. <div></div>
    25. </body>

    2、阴影:

    1. <style>
    2. body{
    3. background-color:#000;
    4. }
    5. div{
    6. position: absolute;
    7. left: calc(50% - 50px);
    8. top: calc(50% - 50px);
    9. width: 100px;
    10. height: 100px;
    11. background-color: transparent;
    12. border: 1px solid #fff;
    13. /* 外阴影: */
    14. /* box-shadow: 0px 0px 0px 0px #0ff;可以负值 */
    15. /* 第一个水平偏移量,第二个垂直偏移量,第四个传播距离 */
    16. /* 第三个参数:基于边框向两侧同时向外展开模糊,越大越虚:模糊值 */
    17. /* 内阴影:向边框内 */
    18. box-shadow: inset 0px 0px 1px 0px #fff,
    19. 3px 0px 10px #f0f,
    20. 0px -3px 10px #0ff,
    21. 0px 3px 10px #ff0;
    22. }
    23. </style>
    24. </head>
    25. <body>
    26. <div></div>
    27. </body>

    3、圆形阴影实例:
    阴影在文字的下面,在背景颜色的上面

     <style>
         *{
             margin: 0px;
             padding: 0px;
         }
         body{
             background-color: #000;
         }
         div{
             position: absolute;
             left: calc(50% - 150px);
             top: calc(50% - 150px);
             width: 300px;
             height: 300px;
            border: 1px solid #fff;
            border-radius: 50%;
    
            box-shadow: inset 0px 0px 50px #fff,
            inset 10px 0px 80px #f0f,
            inset -10px 0px 80px #0ff,
            inset 10px 0px 300px #f0f,
            inset -10px 0px 300px #0ff,
            0px 0px 50px #fff,
            -10px 0px 80px #f0f,
            10px 0px 80px #0ff;
    
         }
        </style>
    </head>
    <body>
        <div></div>
    </body>
    

    4、小太阳实例

    <style>
         *{
             margin: 0px;
             padding: 0px;
         }
         body{
             background-color: #000;
         }
         div{
          position: absolute;
          left: calc(50% - 25px);
          top: calc(50% - 25px);
          width: 50px;
          height: 50px;
          background-color: #fff;
          border-radius: 50%;
    
          box-shadow: 0px 0px 100px 50px #fff,
                      0px 0px 250px 125px #ff0;
    
         }
        </style>
    </head>
    <body>
        <div></div>
    </body>
    

    5、过渡小方块

      <style>
       div{
           position: absolute;
           border-radius: 5px;
           left: calc(50% - 50px);
           top:calc(50% - 50px);
           width: 100px;
           height: 100px;
           background-color: #fff;
    
           box-shadow: 0px 1px 2px rgba(0,0,0, .1);
       }
       div::after{
           content: "";
           position: absolute;
           left: 0;
           top: 0;
           width: 100%;
           height: 100%;
           border-radius: 5px;
           box-shadow: 0px 5px 15px rgba(0,0,0,0.3);
           opacity: 0;
           transition: all .6s;
       }
       div:hover{
           transform:scale(1.25,1.25);
       }
       div:hover::after{
           opacity: 1;
       }
        </style>
    </head>
    <body>
        <div></div>
    </body>