Created
May 13, 2015 07:31
-
-
Save anonymous/f996be782dbe2a8f9e41 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/rija/3
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/normalize.min.css" rel="stylesheet" type="text/css" /> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/foundation.min.css" rel="stylesheet" type="text/css" /> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/vendor/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/foundation.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.overlay-container { | |
position: relative; | |
} | |
.overlay-container .overlay { | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
padding: 0.4rem; | |
background-color: rgba(255, 255, 255, 0.7); | |
text-align: center; | |
font: 0/0 a; | |
} | |
.overlay-container .overlay:before { | |
content: ' '; | |
display: inline-block; | |
vertical-align: middle; | |
height: 100%; | |
} | |
.overlay-container .overlay span { | |
font: 16px/1 Arial, sans-serif; | |
display: inline-block; | |
vertical-align: middle; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="row"> | |
<div class="large-3 small-6 columns"> | |
<div class="overlay-container"> | |
<img src="http://lorempixel.com/500/300" /> | |
<div class="overlay"> | |
<span>Overlay text</span> | |
</div> | |
</div> | |
<h6 class="panel"><strong>My Pic Description</strong></h6> | |
</div> | |
</div> | |
<script id="jsbin-source-css" type="text/css">.overlay-container { | |
position: relative; | |
} | |
.overlay-container .overlay { | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
padding: 0.4rem; | |
background-color: rgba(255, 255, 255, 0.7); | |
text-align: center; | |
font: 0/0 a; | |
} | |
.overlay-container .overlay:before { | |
content: ' '; | |
display: inline-block; | |
vertical-align: middle; | |
height: 100%; | |
} | |
.overlay-container .overlay span { | |
font: 16px/1 Arial, sans-serif; | |
display: inline-block; | |
vertical-align: middle; | |
} | |
</script> | |
</body> | |
</html> |
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
.overlay-container { | |
position: relative; | |
} | |
.overlay-container .overlay { | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
padding: 0.4rem; | |
background-color: rgba(255, 255, 255, 0.7); | |
text-align: center; | |
font: 0/0 a; | |
} | |
.overlay-container .overlay:before { | |
content: ' '; | |
display: inline-block; | |
vertical-align: middle; | |
height: 100%; | |
} | |
.overlay-container .overlay span { | |
font: 16px/1 Arial, sans-serif; | |
display: inline-block; | |
vertical-align: middle; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment