animation-delay属性怎么用

animation-delay属性是用来定义动画何时开始,以秒或毫秒为单位;使用animation-delay属性可以自定义动画的延迟效果。

animation-delay属性怎么用

CSS3  animation-delay属性

作用:animation-delay 属性定义动画何时开始。animation-delay 值以秒或毫秒计。

语法:

animation-delay: time;

登录后复制

time:可省略,默认值是 0;用来定义动画开始前等待的时间,以秒或毫秒计。   

说明:time允许为负值,-2s使动画马上开始,但跳过 2 秒进入动画。

注:Internet Explorer 9 以及更早的版本不支持 animation-delay 属性。

CSS3  animation-delay属性的使用示例

nbsp;html> div{width:100px;height:100px;background:red;position:relative;animation:mymove 5s infinite;animation-delay:2s;/*Safari and Chrome*/-webkit-animation:mymove 5s infinite;-webkit-animation-delay:2s;}@keyframes mymove{from {left:0px;}to {left:200px;}}@-webkit-keyframes mymove /*Safari and Chrome*/{from {left:0px;}to {left:200px;}}

登录后复制

效果图:

1.gif

以上就是本篇文章的全部内容,希望能对大家的学习有所帮助。更多精彩内容大家可以关注【创想鸟】相关教程栏目!!!

以上就是animation-delay属性怎么用的详细内容,更多请关注【创想鸟】其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2888894.html

(0)
上一篇 2025年3月10日 21:16:20
下一篇 2025年3月5日 04:24:32

AD推荐 黄金广告位招租... 更多推荐

相关推荐

发表回复

登录后才能评论