Skip to content

Instantly share code, notes, and snippets.

@keyframes example {
0% {
transform: scale(0.2);
}
70%{
transform: scale(1.5);
}
100% {
transform: scale(1);
}
@keyframes example {
0% {
transform: translate(-100px, -100px);
}
70%{
transform: translate(500px, 500px);
}
100% {
transform: translate(400px, 400px);
}
@keyframes example {
0% {
transform: translateX(-100px);
}
50%{
transform: translateX(500px);
}
100% {
transform: translateX(400px);
}
@keyframes example {
0% {width:100px;}
75% {width:400px;}
100% {width:300px;}
}
@keyframes example {
0% {width:100px;}
100% {width:300px;}
}
.box {
width: 100px;
height: 100px;
background-color: red;
-webkit-transition: width 2s, height 4s; /* Safari */
transition: width 2s, height 4s;
<div class="box"></div>
.box {
width: 100px;
height: 100px;
background: red;
-webkit-transition: width 2s; /* Safari */
transition: width 2s;
}
.box:hover {
width:300px;