-
-
Save kandeefloss/6146031 to your computer and use it in GitHub Desktop.
Delayed transitions
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
/** | |
* Delayed transitions | |
*/ | |
.container { font: 14px sans-serif; width: 11em; height: 10em; background: #eee; position: relative; } | |
.title, .content { position: absolute; left: 1em; right: 0em; background: orange; color: white; padding: .5em 1em; } | |
.title { top: 7em; transition: all .3s .3s; } | |
.content { top: 11em; transition: all .3s; } | |
.container:hover .title { top: 1em; transition: all .3s; } | |
.container:hover .content { top: 4em; transition: all .3s .3s; } |
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> --> | |
<div class="container"> | |
<div class="title">Title goes here</div> | |
<div class="content">Lorem ipsum dolor sit amet</div> | |
</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","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment