Created
February 24, 2017 23:36
-
-
Save CodeMyUI/5559b03e546428c734791251bcec9bf8 to your computer and use it in GitHub Desktop.
Double Slanted Header
This file contains 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
<header> | |
<h1> | |
My Code Pen | |
</h1> | |
<h2> | |
Double Slanted Header | |
</h2> | |
<h3> | |
Thanks for taking a look! | |
</h3> | |
</header> | |
<div> | |
<a target="blank" href="http://codepen.io/BadMoodTaylor/pen/KaLjzo">My CodePen for a Polygon Header using Clip</a> | |
<p>Clip-Path is not very well supported though</p> | |
</div> |
This file contains 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
header{ | |
margin: 0; padding: 2em 5em 4em; color: #efefef; | |
overflow:hidden; | |
position: relative; | |
} | |
header::after{ | |
content:""; | |
position:absolute; | |
top:0; | |
left:0; | |
height: 100%; | |
width:100%; | |
transform: skewY(-4deg); | |
background: red; | |
transform-origin: bottom left; | |
z-index: -1; | |
} | |
header::before{ | |
content:""; | |
position:absolute; | |
top:0; | |
left:0; | |
height: 100%; | |
width:100%; | |
transform: skewY(8deg); | |
background: red; | |
transform-origin: bottom right; | |
z-index: -1; | |
} | |
body{margin:0; background: #efefef;} | |
div{padding: 4em;} | |
header{ | |
display: flex; | |
flex-flow: column nowrap; | |
} | |
header > h3 {align-self: flex-end;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment