css3动画属性名是什么
时间:2022-02-11 17:28
在css3中,动画属性名是“animation”,该属性是一个简写属性,用于规定绑定的keyframe名称、动画时间、速度曲线、动画延迟、动画次数和是否反向播放动画,语法为“animation:名称 时间 速度 延迟 次数 是否反向播放”。 本教程操作环境:windows10系统、CSS3&&HTML5版、Dell G3电脑。 animation 属性是一个简写属性,用于设置六个动画属性: animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction 注释:请始终规定 animation-duration 属性,否则时长为 0,就不会播放动画了。 语法为: 其中参数表示的值为: 示例如下: 输出结果: (学习视频分享:css视频教程) 以上就是css3动画属性名是什么的详细内容,更多请关注gxlsystem.com其它相关文章!css3动画属性名是什么
animation: name duration timing-function delay iteration-count direction;
<html>
<head>
<meta charset="utf-8">
<title>123</title>
<style>
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove 5s infinite;
-webkit-animation:mymove 5s infinite; /*Safari and Chrome*/
}
@keyframes mymove
{
from {left:0px;}
to {left:200px;}
}
@-webkit-keyframes mymove /*Safari and Chrome*/
{
from {left:0px;}
to {left:200px;}
}
</style>
</head>
<body>
<p><strong>注意: </strong> Internet Explorer 9 及更早IE版本不支持 animation 属性。</p>
<div></div>
</body>
</html>