Created
February 11, 2016 14:29
-
-
Save wietseneven/cad8a958bb80c3c973c1 to your computer and use it in GitHub Desktop.
Clip path expirment
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
/** | |
* Clip path expirment | |
*/ | |
html, body { | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
.event { | |
display: block; | |
position: absolute; | |
background: purple; | |
width: 40%; | |
height: 100%; | |
} | |
.event.uno { | |
-webkit-clip-path: polygon(0 0, 100% 0, 80% 50%, 100% 100%, 0 100%); | |
z-index: 10; | |
} | |
.event.dos, .event.tres { | |
width: 60%; | |
height: 50%; | |
right: 0; | |
background: orange; | |
} | |
.event.tres { | |
bottom: 0; | |
background: green; | |
} |
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
<div class="event uno"></div> | |
<div class="event dos"></div> | |
<div class="event tres"></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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment