“看清animation,transform, @keyframes,transition这四个的脸,以后这四个来了就是要做动画了,看好你们的网页,除了这四个,谁管你们都不好使。”
一.transition(过渡)
(一)transition的作用
如果你有一个盒子,他的体内也有个小盒子。现在我们想把鼠标放上去他就能变大。
<style>
.father {
width: 200px;
height: 200px;
background-color: pink;
}
.son {
width: 100px;
height: 100px;
background-color: skyblue;
}
</style>
<body>
<div class="father">
<div class="son"></div>
</div>
</body>
效果如下:
现在我们给他添加鼠标放上去子盒子变大效果
<style>
.son:hover