Created
February 27, 2017 08:24
-
-
Save ekumachidi/5db4f2e937ecdff5c386bcff94c12841 to your computer and use it in GitHub Desktop.
Overlay pictures
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
<!-- Sample code to overlay pictures --> | |
<div class="height-100vh center-aligned"> | |
<!-- Background image or banner --> | |
<img class="background-image" src="http://i.imgur.com/1aBfM.png" /> | |
<!-- Uploaded image --> | |
<img src="http://i.imgur.com/DH3Qw.png" class="text"> | |
</div> | |
<style type="text/css"> | |
body { | |
margin: 0px; | |
} | |
.height-100vh { | |
height: 100vh; | |
} | |
.center-aligned { | |
display: box; | |
display: flex; | |
box-align: center; | |
align-items: center; | |
box-pack: center; | |
justify-content: center; | |
} | |
.background-image { | |
position: relative; | |
} | |
.text { | |
position: absolute; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment