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; |
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
/** | |
* Scrolling hints | |
*/ | |
ul { | |
display: inline-block; | |
overflow: auto; | |
width: 7.2em; | |
height: 7em; | |
border: 1px solid silver; |
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
/** | |
* Extending the hit area — with generated content | |
*/ | |
button { | |
position: relative; | |
padding: .3em .5em; | |
background: #58a; | |
border-radius: 50%; | |
border: 1px solid rgba(0,0,0,.3); |
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
/** | |
* Interactive image comparison - with CSS resize | |
*/ | |
.image-slider { | |
position:relative; | |
display: inline-block; | |
} | |
.image-slider > 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
/** | |
* Hyphenation | |
*/ | |
width: 8.7em; | |
font: 180%/1.4 Baskerville, serif; | |
text-align: justify; | |
hyphens: auto; |
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
/** | |
* Frame-by-frame animations | |
*/ | |
@keyframes loader { | |
to { background-position: -800px 0; } | |
} | |
.loader { | |
width: 100px; height: 100px; |
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
/** | |
* Blinking | |
*/ | |
@keyframes blink-1 { 50% { color: transparent } } | |
@keyframes blink-2 { to { color: transparent } } | |
p { | |
padding: 1em; | |
background: gold; |
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
/** | |
* Typing animation | |
*/ | |
@keyframes typing { | |
from { width: 0 } | |
} | |
@keyframes caret { | |
50% { border-right-color: transparent; } |
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
/** | |
* Smooth state animations | |
* Photo credits: https://www.flickr.com/photos/employtheskinnyboy/3904743709 | |
*/ | |
@keyframes panoramic { | |
to { background-position: 100% 0; } | |
} | |
.panoramic { |
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
/** | |
* Animation along a circular path - Solution 1 | |
*/ | |
@keyframes spin { | |
to { transform: rotate(1turn); } | |
} | |
.avatar { | |
animation: spin 3s infinite linear; |
OlderNewer