Created
September 29, 2018 12:29
-
-
Save TimeBandit/b8f16c4df577084d66a3449f806c993b to your computer and use it in GitHub Desktop.
create a slanted edge #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
#hero { | |
background: #834d9b; /* fallback for old browsers */ | |
background: -webkit-linear-gradient( | |
to right, | |
#d04ed6, | |
#834d9b | |
); /* Chrome 10-25, Safari 5.1-6 */ | |
background: linear-gradient( | |
to right, | |
#d04ed6, | |
#834d9b | |
); /* W3C, IE 10+/ Edge, Firefox 16+*/ | |
position: relative; | |
z-index: 1; | |
border: 1px dashed | |
} | |
#hero:after{ | |
content:""; | |
display:block; | |
background:inherit; | |
z-index:-1; | |
height:50%; | |
position:absolute; | |
bottom:0; | |
left:0; | |
right:0; | |
transform:skewY(-1.5deg); | |
transform-origin:100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment