Last active
December 13, 2021 02:21
-
-
Save csssecrets/7563400 to your computer and use it in GitHub Desktop.
Diamond images — via transforms
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
/** | |
* Diamond images — via transforms | |
*/ | |
.diamond { | |
width: 250px; | |
height: 250px; | |
transform: rotate(45deg); | |
overflow: hidden; | |
margin: 100px; | |
} | |
.diamond img { | |
max-width: 100%; | |
transform: rotate(-45deg) scale(1.42); | |
z-index: -1; | |
position: relative; | |
} |
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="diamond"> | |
<img src="http://csssecrets.io/images/adamcatlace.jpg" /> | |
</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