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 cancel Animation effect by css3

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly explains "how to cancel animation effect by css3". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to cancel the animation effect with css3".

In css, you can cancel the animation effect with the "animation-play-state" attribute, which specifies the pausing effect of the animation. When the value of the attribute is "paused", the animation will be paused, that is, to cancel the animation effect, and the syntax "element {animation-play-state:paused}".

The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.

How to cancel Animation effect by css3

In css, to achieve unanimated effects, you can use the animation-play-state property.

The animation-play-state property specifies whether the animation is running or paused. The syntax is as follows:

Animation-play-state: paused | running

Where the attribute value is represented as follows:

Examples are as follows:

Document div {width:100px; height:100px; background-color:pink; animation:fadenum 5s infinite;} @ keyframes fadenum {100% {transform:rotate (360deg);}} div:hover {animation-play-state:paused;}

Output result:

At this point, I believe you have a deeper understanding of "how to cancel the animation effect in css3". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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