Created
March 20, 2012 18:46
-
-
Save keithwyland/2139621 to your computer and use it in GitHub Desktop.
CSS3 Hover Image
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
/** CSS3 Hover Image | |
* The first commented line is your dabblet’s title | |
*/ | |
*{transition: all 0.5s ease;} | |
.container { | |
float: left; | |
border: 1px solid black; | |
width: 200px; | |
} | |
.something { | |
background-color: #ffe; | |
transition: all 0.5s ease; | |
width: 100%; | |
} | |
.nextthing { | |
float: left; | |
width: 60%; | |
} | |
.nextthing h1, .nextthing p { | |
float: left; | |
clear: both; | |
} | |
.something img { | |
width: 100%; | |
position: relative; | |
} | |
.something:hover { | |
width: 400px; | |
background-color: #eef; | |
z-index: 9999; | |
position: absolute; | |
right: 0; | |
} |
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="nextthing"> | |
<h1>Stuff</h1> | |
<p>Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here Some other text here </p> | |
</div> | |
<div class="container"> | |
<div class="something"> | |
<h2>Some thing</h2> | |
<img src="http://placekitten.com/300/239"> | |
</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
{"view":"split-vertical","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment