Skip to content Skip to sidebar Skip to footer

Is It Possible To Create A Sheared Div?

Is it possible to create a header div that is sheared/oblique like in the image below? Its for a mobile website

Solution 1:

Yes, this is possible: DEMO

.wrapper {
overflow:hidden;
height:300px;
width:100%;
background: url(http://placekitten.com/g/300/300);
position:relative;
}
.top {
background:gray;
height:60%;
width:130%;
position:absolute;
top:-30%;
left:-5%;
transform:rotate(5deg);
border-bottom:10px solid white;
}
.text{
position:absolute;
top:20px;
right:10%;
padding:10px;
border-radius:10px;
border:5px solid white;
transition:all 0.8s;
}
.text:hover{
box-shadow:0010px white;
}
<divclass="wrapper"><divclass="top"></div><divclass="text">MENU</div></div>

Post a Comment for "Is It Possible To Create A Sheared Div?"