-1

I'm trying to make the following shape in CSS:

enter image description here

I can do it using rotations but the problem is that I need to have a background image that doesn't get rotated.

esqew
  • 42,425
  • 27
  • 92
  • 132
Taimur
  • 3,171
  • 8
  • 32
  • 38

2 Answers2

0

Here you go.

#box {
    width: 200px;
    height: 200px;
    background: black;
    position: relative;
    -webkit-transition: all 300ms ease-in;
}
#box:hover {
    -webkit-transform: rotate(-180deg) scale(0.8);
}
#box:after {
    display: block;
    content: "\0020";
    color: transparent;
    width: 211px;
    height: 45px;
    background: white;
    position: absolute;
    left: 1px;
    bottom: -20px;
    -webkit-transform: rotate(-12deg);
    -moz-transform: rotate(-12deg);
}
charles
  • 547
  • 1
  • 3
  • 11
0

HTML

<div id='s'></div>

CSS

 #s {
    width:0px;
    height:0px;
    border:none;
    border-left:400px solid #000;
    border-top:400px solid #000;
    border-bottom:200   px solid #fff;
  }

http://jsfiddle.net/xvm7K/

user2320601
  • 162
  • 2