Created
January 26, 2015 12:09
-
-
Save csssecrets/c62456fed36a524b8273 to your computer and use it in GitHub Desktop.
Diamond images — via clip-path
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
| /** | |
| * Diamond images — via clip-path | |
| */ | |
| img { | |
| max-width: 250px; | |
| margin: 20px; | |
| -webkit-clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); | |
| clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); | |
| transition: 1s; | |
| } | |
| img:hover { | |
| -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); | |
| clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); | |
| } |
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
| <img src="http://csssecrets.io/images/adamcatlace.jpg" /> | |
| <img src="http://csssecrets.io/images/adam-sleeping.jpg" /> |
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
| // alert('Hello world!'); |
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
| {"view":"split","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