效果:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Animation</title>
<style>
.normal{
width: 100px;
height: 100px;
background-color: aqua;
}
.animation{
margin-top: 30px;
width: 100px;
height: 100px;
background-color: aqua;
transition: width 2s;
transition-timing-function: cubic-bezier(0.25,0.1,0.25,1);
animation: normal ;
}
.animation:hover{
/*transform: translate(50px,100px);*/
/*transform: rotate(30deg);*/
/*transform: scale(2,2);*/
/*transform: skew(20deg,20deg);*/
/*transform: rotateX(50deg);*/
width: 200px;
}
</style>
</head>
<body>
<div class="animation"></div>
<br/>
</body>
</html>