Skip to content

Instantly share code, notes, and snippets.

@aab595
Created February 11, 2022 10:34
Show Gist options
  • Save aab595/5818f3b198340977a6dee85487199238 to your computer and use it in GitHub Desktop.
Save aab595/5818f3b198340977a6dee85487199238 to your computer and use it in GitHub Desktop.
CSSTransitionsAnimations - 02 - Exercise
<h1>Exercise 2</h1>
Apply a 2 second transition to the width property of the div.
Define an ease-in-out timing function for the transition.
<div></div>
<p>Hover over the div element above.</p>
div {
width: 100px;
height: 100px;
background: red;
transition: width 2s ease-in-out;
}
div:hover {
width: 300px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment