Skip to content

Instantly share code, notes, and snippets.

@sudarshanReddykurri
Last active September 6, 2016 15:01
Show Gist options
  • Save sudarshanReddykurri/27264ff824976569616842be56b3ec4f to your computer and use it in GitHub Desktop.
Save sudarshanReddykurri/27264ff824976569616842be56b3ec4f to your computer and use it in GitHub Desktop.
Slant Height to the Top Background in pure CSS
<div class="slant-right">
<div class="slant-right-inner" style="border-right-width: 1349px;"></div>
</div>
.slant-right {
width: 100%;
position: relative;
z-index: 1;
}
.slant-right .slant-right-inner{
height: 150px;
border-top: 150px solid transparent;
border-right: 1000vw solid #f7f7f7;
position: relative;
margin: auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment