Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="layer" style="z-index:20; pointer-events:none;">Top layer</div>
- <div class="layer" style="z-index:10;">Bottom layer</div>
- .layer {
- position:absolute;
- top:0px;
- left:0px;
- height:400px;
- width:400px;
- }
- <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>
- .layer {
- position:absolute;
- top:0px;
- left:0px;
- height:400px;
- width:400px;
- }
- $(document).ready(function(){
- $("#bottomlayer").hover(
- function() {
- $("#toplayer").css("display", "block");
- },
- function() {
- $("#toplayer").css("display", "none");
- }
- );
- });
- <div id="bottomlayer" class="layer">Bottom layer</div>
- <div id="toplayer" class="layer">Top layer</div>
- .child {
- pointer-events: none;
- background-color: white;
- }
- .parent:hover > .child {
- background-color: black;
- }
- .hoverOnly:hover {
- pointer-events: none;
- opacity: 0.1;
- transition-delay: 0s;
- }
- .hoverOnly {
- transition: ,5s all;
- opacity: 0.75;
- transition-delay: 2s;
- }
Add Comment
Please, Sign In to add comment