Create a cross shape in CSS

前端 未结 5 631
暗喜
暗喜 2020-12-03 17:05

IS it possible, I know all the following shapes are possible in this link:

http://css-tricks.com/examples/ShapesOfCSS/

but cross must be possible too. When I

5条回答
  •  不知归路
    2020-12-03 17:42

    Because all the answers I see here look either lengthy or vendor-prefix-dependent,

    #cross { 
      background: red; 
      height: 100px; 
      position: relative; 
      left: 50px;
      width: 20px; 
    } 
    #cross:after { 
      background: red; 
      content: ""; 
      height: 20px; 
      left: -40px; 
      position: absolute; 
      top: 40px; 
      width: 100px; 
    }

提交回复
热议问题