A Pen by Abdoul Aziz BA on CodePen.
Created
February 11, 2022 10:40
-
-
Save aab595/ce029825f3314cf0cfb6b7ce012e6aab to your computer and use it in GitHub Desktop.
CSSTransitionsAnimations - 03 - Exercise
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
<h1>Exercise 3</h1> | |
Apply a 1 second transition to the width property of the div one. | |
Apply also a 1 second transition to the width property of the div two, but make sure the animation starts only after the div one has stopped. (hint: use delay) | |
<div id="main"> | |
<div class="one"></div><br> | |
<div class="two"></div> | |
</div> | |
<p>Hover over the div element above.</p> | |
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.one { | |
transition: width 1s ease-in-out; | |
width: 100px; | |
height: 100px; | |
background: red; | |
} | |
div.two { | |
width: 100px; | |
height: 100px; | |
background: blue; | |
transition: width 1s ease-in-out 1s; | |
} | |
div#main:hover .one { | |
width: 300px; | |
} | |
div#main:hover .two { | |
width: 300px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment