Created
October 21, 2014 23:02
-
-
Save davel/baec4755eda5023e489d to your computer and use it in GitHub Desktop.
Mouse over captions in CSS
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
<html> | |
<head> | |
<title>Mouseover example</title> | |
<style type="text/css"> | |
/* The style of the "caption" <div> with the pointer outside. */ | |
div.mousy div.caption { display: none; } | |
/* The style of the "caption" <div> during the hover. */ | |
div.mousy:hover div.caption { display: initial; position: absolute; left: 0px; top: 610px;} | |
</style> | |
</head> | |
<body> | |
<div class="mousy" style="width: 800px; height: 600px;"> | |
<img width="800" height="600" src="http://lbw2014.xn--vdaa.be/IMG_6604.med.JPG" /> | |
<div class="caption">Somewhere in Wales</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment