Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the state of animation playback by html5

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, I would like to share with you the relevant knowledge about how to achieve animation playback status in html5. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

Flying Animation:

# name {

Margin:40px 2% 40px 0

-webkit-animation:flyin 1.5s

-webkit-animation-fill-mode: forwards

-webkit-animation-timing-function: ease-in-out

-webkit-animation-delay: 1800ms

}

@-webkit-keyframes flyin {

From {margin-right: 2%;}

30% {margin-right: 12%;}

50% {margin-right: 9%;}

60% {margin-right: 10%;}

To {margin-right: 10%;}

}

Shake the animation:

# name:hover {

* * margin-right: 10%; / / i also have to set thread! Or it starts at 2% salary *

-webkit-animation:shake 0.7s

-webkit-animation-fill-mode: forwards

-webkit-transform-origin:50% 50%

-webkit-animation-iteration-count: infinite

-webkit-animation-timing-function: linear

}

@-webkit-keyframes shake {

0% {- webkit-transform: translate (2pxMagne1px) rotate (0deg);}

10% {- webkit-transform: translate (- 1pxMorelle 2PX) rotate (- 1deg);}

20% {- webkit-transform: translate (- 3pxMagne0px) rotate (1deg);}

30% {- webkit-transform: translate (0pxMagne2px) rotate (0deg);}

40% {- webkit-transform: translate (1pxmam talk 1PX) rotate (1deg);}

50% {- webkit-transform: translate (- 1pxMagne2px) rotate (- 1deg);}

60% {- webkit-transform: translate (- 3pxMagne1px) rotate (0deg);}

70% {- webkit-transform: translate (2pxMagne1px) rotate (- 1deg);}

80% {- webkit-transform: translate (- 1px cinema talk 1PX) rotate (1deg);}

90% {- webkit-transform: translate (2pxMagne2px) rotate (0deg);}

100% {- webkit-transform: translate (2pxMagne1px) rotate (0deg);}

}

These are all the contents of the article "how to achieve Animation playback status in html5". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report