Last active
September 6, 2016 15:01
-
-
Save sudarshanReddykurri/27264ff824976569616842be56b3ec4f to your computer and use it in GitHub Desktop.
Slant Height to the Top Background in pure CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="slant-right"> | |
| <div class="slant-right-inner" style="border-right-width: 1349px;"></div> | |
| </div> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .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