css animation-duration属性怎么用


当前第2页 返回上一页

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

<!DOCTYPE html>

<html>

<head>

<style>

div

{

width:100px;

height:100px;

background:red;

position:relative;

animation:mymove infinite;

animation-duration:2s;

/* Safari and Chrome */

-webkit-animation:mymove infinite;

-webkit-animation-duration:2s;

}

@keyframes mymove

{

from {top:0px;}

to {top:200px;}

}

@-webkit-keyframes mymove /* Safari and Chrome */

{

from {top:0px;}

to {top:200px;}

}

</style>

</head>

<body>

<p><strong>注释:</strong>Internet Explorer 9 以及更早的版本不支持 animation-name 属性。</p>

<div></div>

<p><b>注释:</b>始终规定 animation-duration 属性,否则时长为 0,就不会播放动画了。</p>

</body>

</html>

效果:

0c2adf527270166cdfc0d0fd6299aa2.png

以上就是css animation-duration属性怎么用的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

border-collapse属性怎么用

css 中 @ 用法详解

background-position属性怎么用

浅谈使用css实现半透明边框和多重边框效果的方法

文字居中的css代码是什么

css如何实现图片轮播

css实现动画性能优化

值得收藏的css性能优化方法

css不透明度怎么设置

css如何设置不规则阴影

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...