在css3中,动画属性名是“animation”,该属性是一个简写属性,用于规定绑定的keyframe名称、动画时间、速度曲线、动画延迟、动画次数和是否反向播放动画,语法为“animation:名称 时间 速度 延迟 次数 是否反向播放”。
本教程操作环境:windows10系统、css3&&html5版、dell g3电脑。
css3动画属性名是什么animation 属性是一个简写属性,用于设置六个动画属性:
animation-name
animation-duration
animation-timing-function
animation-delay
animation-iteration-count
animation-direction
注释:请始终规定 animation-duration 属性,否则时长为 0,就不会播放动画了。
语法为:
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>
输出结果:
(学习视频分享:css视频教程)
以上就是css3动画属性名是什么的详细内容。