本文介绍关闭 icon 的实现。具体如下

1.html部分

<span id="close"></span>

2.css部分

    #close {
        display: inline-block;
        width: 30px;
        height: 4px;
        background: #333;
        transform: rotate(45deg);
    }

    #close::after {
        content: '';
        display: block;
        width: 30px;
        height: 4px;
        background: #333;
        transform: rotate(-90deg);
    }

效果如图:

纯CSS 实现关闭图标 icon

就是这样,是不是很简单呢。

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
猜你喜欢
  • 2021-12-01
  • 2021-11-22
  • 2021-11-15
  • 2022-02-07
  • 2021-12-24
  • 2021-11-16
  • 2022-01-01
相关资源
相似解决方案