作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在学习如何制作 css3 动画。我怎样才能让这个盒子在向下 move 时淡入淡出?
示例: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>
最佳答案
您可以向动画关键帧添加多个规则。
{
from {top:0px; opacity: 0;}
to {top:200px; opacity: 1;}
}
关于css3 动画,淡入为下移?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17322305/
我是一名优秀的程序员,十分优秀!