Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <!-- Markup -->
  2. <div class="container">
  3. <div class="imageOne image"></div>
  4. <div class="imageTwo image"></div>
  5. </div>
  6.  
  7. <!-- CSS(important to add height to container class as well as image class since we have empty divs) -->
  8.  
  9. .container {
  10. position: relative;
  11. height: 100px;
  12. }
  13. .image {
  14. position: absolute;
  15. width: 100px;
  16. height: 100px;
  17. border: 3px solid black;
  18. }
  19.  
  20. .imageOne {
  21. z-index: 0;
  22. }
  23.  
  24. .imageTwo {
  25. z-index: 1;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement