Created
February 27, 2020 23:41
-
-
Save greystate/83df4e77929a14a7cf5f9082ddc1f044 to your computer and use it in GitHub Desktop.
Clip Path Exploration
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 Exploration | |
*/ | |
html { | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
} | |
img { | |
transition: 0.5s ease; | |
max-width: 80%; | |
display: block; | |
min-height: 30em; | |
margin: auto; | |
background-color: lime; | |
background-size: contain; | |
-webkit-clip-path: polygon(0 100%, 20% 16%, 100% 0, 80% 84%); | |
} | |
img.unclipped { | |
-webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%); | |
} |
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
<!-- content to be placed inside <body>…</body> --> | |
<img class="unclipped" src="https://i.picsum.photos/id/1016/700/425.jpg"> |
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":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"result"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment