Created
September 26, 2014 09:39
-
-
Save gustaff-weldon/67653abd11673b19ca15 to your computer and use it in GitHub Desktop.
Background and opacity transitions
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
/** | |
* Background and opacity transitions | |
*/ | |
.container { | |
background: rgba( 255, 150, 10, 100); | |
overflow: hidden; | |
} | |
.box { | |
float: left; | |
margin: 10px; | |
background: rgba(100,150,30,0.5); | |
width: 200px; | |
height:200px; | |
transition: all 0.3s ease-in; | |
} | |
.container:hover .bg-hide, | |
.bg-hide:hover { | |
background: rgba(0,0,0,0); | |
} | |
.container:hover .hide, | |
.hide:hover { | |
opacity: 0; | |
} |
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
<div class="box hide">This box dissappears completely </div> | |
<div class="box bg-hide">This box's background fades out</div> | |
<div class="container"> | |
<div class="box hide">This box dissappears completely </div> | |
<div class="box bg-hide">This box's background fades out</div> | |
</div> |
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":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment