CSS css3 transition / transform
1 min readAug 23, 2018
# add transition mouse over and mouse down
- so animation runs when mouse on and off
body > div {
width: 300px;
margin: 20px auto;
position: relative;
}div div:first-child {
background: blue;
width: 200px;
height: 200px;
-webkit-transition: 5s;
transition: 5s;
}div div:hover {
background: red;
-webkit-transition: 1s;
transition: 1s;
}
<div class="key">11</div>.key {
width: 100px;
height: 100px;
background: red;transition: all 2s;
}.key:hover {
transform:scale(2);
}