Skip to content

Instantly share code, notes, and snippets.

@davel
Created October 21, 2014 23:02
Show Gist options
  • Save davel/baec4755eda5023e489d to your computer and use it in GitHub Desktop.
Save davel/baec4755eda5023e489d to your computer and use it in GitHub Desktop.
Mouse over captions in CSS
<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