折翼的飞鸟

导航

CSS实现关闭叉叉按钮

按钮参考 

标签:

 <div className={'close-img-shade'}></div>

样式:

.close-img-shade::before, .close-img-shade::after {
    content: '';
    position: absolute;
    height: 2px;
    width: 50px;
    top: 50%;
    left: 50%;
    //margin-top: -1px;
    background-color: #ff0000;
  }
  .close-img-shade::before {
    transform: rotate(45deg);
  }
  .close-img-shade::after {
    transform: rotate(-45deg);
  }

 

posted on 2021-10-20 16:50  折翼的飞鸟  阅读(388)  评论(0编辑  收藏  举报