Home>Article>Web Front-end> What are the properties that implement animation effects in css3

What are the properties that implement animation effects in css3

WBOY
WBOY Original
2021-12-15 11:17:46 4319browse

Attributes to achieve animation effects in CSS: 1. "animation" attribute, which can be used in conjunction with the "@keyframes" rule to set animation effects for elements; 2. "transition" attribute, which can give Elements are animated excessively.

What are the properties that implement animation effects in css3

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

What are the properties used to achieve animation effects in css3

In css, if you want to achieve animation effects, you can use the animation attribute and transition attribute.

1. The animation attribute is an abbreviated attribute, used to set six animation attributes. The syntax is as follows:

animation: name duration timing-function delay iteration-count direction;

The attribute value is as follows:

What are the properties that implement animation effects in css3

Examples are as follows:

   

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

Output results:

What are the properties that implement animation effects in css3

2. The transition attribute is an abbreviated attribute used to set four transition attributes. The syntax is as follows :

transition: property duration timing-function delay;

The attribute value is as follows:

What are the properties that implement animation effects in css3

The example is as follows:

   

请把鼠标指针移动到蓝色的 div 元素上,就可以看到过渡效果。

注释:本例在 Internet Explorer 中无效。

Output result:

What are the properties that implement animation effects in css3

(Learning video sharing:css video tutorial)

The above is the detailed content of What are the properties that implement animation effects in css3. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn