- HTML中文网
- 联系QQ:88526
- QQ交流群

- 微信公众号

animation-name属性
含义:
animation-name 属性为 @keyframes 动画指定名称。
浏览器支持:
属性 | | | | | |
浏览器 | IE | Chrome | Firefox | Safari | Opera |
animation-name | 10.0 | 43.0/4.0 -webkit- | 16.0/5.0 -moz- | 9.0/4.0 -webkit- | 30.0 15.0 -webkit- 12.0 -o- |
CSS语法:
animation-name: keyframename|none;
属性值:
keyframename:指定要绑定到选择器的关键帧的名称
none:指定有没有动画(可用于覆盖从级联的动画)
动画的名称为demo
<style type="text/css"> div{ width:100px; height:100px; position: relative; background-color:hsl(120,65%,75%); animation:demo 5s 1 ; -webkit-animation:demo 5s 1; } @keyframes demo { from {left:0px;} to {left:350px; } } /*Safari 和 Chrome */ @-webkit-keyframes demo { from {left:0px;} to {left:350px; } } </style> </head> <body> <div></div> </body>
点击 "运行实例" 按钮查看在线实例
效果图:
推荐手册