css中的animation-iteration-count属性怎么用

发布时间:2022-02-25 13:50:44 作者:小新
来源:亿速云 阅读:255

小编给大家分享一下css中的animation-iteration-count属性怎么用,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

  CSS3animation-iteration-count属性

  作用:animation-iteration-count属性定义动画的播放次数。

  语法:

  animation-iteration-count:n|infinite;

  n:定义动画播放次数的数值。

  infinite:规定动画应该无限次播放。

  注:InternetExplorer9以及更早的版本不支持animation-iteration-count属性。

  CSS3animation-iteration-count属性的使用示例

  设置动画循环3次

  <!DOCTYPEhtml>

  <html>

  <head>

  <style>

  div

  {

  width:100px;

  height:100px;

  background:red;

  position:relative;

  animation:mymove3s;

  animation-iteration-count:3;

  /*SafariandChrome*/

  -webkit-animation:mymove3s;

  -webkit-animation-iteration-count:3;

  }

  @keyframesmymove

  {

  from{top:0px;}

  to{top:200px;}

  }

  @-webkit-keyframesmymove/*SafariandChrome*/

  {

  from{top:0px;}

  to{top:200px;}

  }

  </style>

  </head>

  <body>

  <div></div>

  </body>

  </html>



css中的animation-iteration-count属性怎么用

以上是“css中的animation-iteration-count属性怎么用”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

推荐阅读:
  1. css中使用animation-iteration-count属性的方法
  2. css中的float属性怎么用

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

css

上一篇:企业商家开发app和开发小程序有哪些区别

下一篇:开发短视频小程序能为商家带来哪些价值

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》