Guest User

Untitled

a guest
Jan 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <div class="layer" style="z-index:20; pointer-events:none;">Top layer</div>
  2. <div class="layer" style="z-index:10;">Bottom layer</div>
  3.  
  4. .layer {
  5. position:absolute;
  6. top:0px;
  7. left:0px;
  8. height:400px;
  9. width:400px;
  10. }
  11.  
  12. <div id="toplayer" class="layer" style="z-index:20; pointer-events:none; background-color: white; display: none;">Top layer</div><div id="bottomlayer" class="layer" style="z-index:10;">Bottom layer</div>
  13.  
  14. .layer {
  15. position:absolute;
  16. top:0px;
  17. left:0px;
  18. height:400px;
  19. width:400px;
  20. }
  21.  
  22. $(document).ready(function(){
  23. $("#bottomlayer").hover(
  24. function() {
  25. $("#toplayer").css("display", "block");
  26. },
  27. function() {
  28. $("#toplayer").css("display", "none");
  29. }
  30. );
  31. });
  32.  
  33. <div id="bottomlayer" class="layer">Bottom layer</div>
  34. <div id="toplayer" class="layer">Top layer</div>
  35.  
  36. .child {
  37. pointer-events: none;
  38. background-color: white;
  39. }
  40.  
  41. .parent:hover > .child {
  42. background-color: black;
  43. }
  44.  
  45. .hoverOnly:hover {
  46. pointer-events: none;
  47. opacity: 0.1;
  48. transition-delay: 0s;
  49. }
  50. .hoverOnly {
  51. transition: ,5s all;
  52. opacity: 0.75;
  53. transition-delay: 2s;
  54. }
Add Comment
Please, Sign In to add comment