css创建叉和勾

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ck3345143/article/details/72847380
//勾的创建
i{ display: inline-block; width: 10px;height:5px; background: red;line-height: 0;font-size:0;vertical-align: middle;-webkit-transform: rotate(45deg);}

i:after{content:'/';display:block;width: 20px;height:5px; background: red;-webkit-transform: rotate(-90deg) translateY(-50%) translateX(50%);}



×
//叉的创建
        a{ display: inline-block; width: 20px;height:5px; background: red;line-height: 0;font-size:0;vertical-align: middle;-webkit-transform: rotate(45deg);}
  a:after{content:'/';display:block;width: 20px;height:5px; background: red;-webkit-transform: rotate(-90deg);}

猜你喜欢

转载自blog.csdn.net/ck3345143/article/details/72847380