我正在学习如何制作 css3 动画。我怎样才能让这个盒子在它向下移动时淡入淡出?
示例:http: //jsfiddle.net/RtWTN/1/
<!DOCTYPE html>
<html>
<head>
<style>
div
{
width: 100px;
height: 100px;
background: red;
position: relative;
animation: mymove 3s ease-out forwards;
animation-iteration-count: 3;
}
@keyframes mymove
{
from { top: 0px;}
to { top: 200px;}
}
</style>
</head>
<body>
<div></div>
</body>
</html>