A Pen by Hyeonseo Yang on CodePen.
Created
August 4, 2020 06:46
-
-
Save yhs0602/7a4d69fd36c4776dd85223a0c0c5bea3 to your computer and use it in GitHub Desktop.
Relative hover
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
<div class="box"> 1 </div> | |
<div class="box2"> 2 </div> | |
<div class="box"> 3 </div> |
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
.box { | |
position: relative; | |
width: 100px; | |
height: 100px; | |
background: blue; | |
margin: 10px; | |
} | |
.box2 { | |
position:relative; | |
width: 100px; | |
height: 100px; | |
background: tomato; | |
margin: 10px; | |
bottom: 50px; | |
left: 250px; | |
} | |
.box2:hover { | |
background: green; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment