image.png
    核心思路:利用边框半径实现圆形,鼠标经过事件加上2d缩放
    代码实现:

    1. <style>
    2. div {
    3. width: 100px;
    4. margin: 0 auto;
    5. }
    6. a {
    7. display: block;
    8. width: 50px;
    9. height: 50px;
    10. border-radius: 50%;
    11. background-color: transparent;
    12. border: 1px solid #000;
    13. text-decoration: none;
    14. text-align: center;
    15. line-height: 50px;
    16. color: black;
    17. transition: all 0.2s;
    18. }
    19. a:hover {
    20. transform: scale(1.1);
    21. }
    22. </style>
    23. </head>
    24. <body>
    25. <div>
    26. <a href="#">1</a>
    27. </div>
    28. </body>