Skip to content

Instantly share code, notes, and snippets.

@jsmayo
Created January 23, 2018 08:02
Show Gist options
  • Save jsmayo/daad659d7d375e9fc44a5a2996e5da68 to your computer and use it in GitHub Desktop.
Save jsmayo/daad659d7d375e9fc44a5a2996e5da68 to your computer and use it in GitHub Desktop.
Transition Demo S2.L19
<p class="box">NO TRANSITION</p>
<p class="animated box">TRANSITION</p>
<p class="crazy box">CRAZINESS</p>
.box {
background: #9b59b6;
height: 200px;
width: 200px;
line-height:200px;
text-align: center;
color: white;
font-size: 20px;
}
.animated {
transition-property: background;
transition-duration: 1s;
transition-timing-function: linear;
}
.box:hover {
background: #e74c3c;
}
.crazy {
transition: transform 3s 1s, background 1s 1s;
}
.crazy:hover {
transform: rotate(720deg) scale(0.5);
background: #e67e22;
border-radius: 100px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment