I found the new attribute of animation very interesting, learn it here and organize it!
Browser support :
Internet Explorer 10, Firefox and Opera support the animation attribute;
Safari and Chrome support the alternative -webkit-animation attribute .
Definition and Usage
The animation property is a shorthand property for setting six animation properties:
Syntax
animation: name duration timing-function delay iteration-count direction;
animation-name | Specifies the keyframe that needs to be bound to the selector name. .
Where animation-timing-function uses a mathematical function called the Cubic Bezier function to generate the velocity curve. You can use your own values in this function, or predefined values:
Case: Very practical, an arrow jumps up and down in a loop 50% {transform:translate(0, 0)} 100% {transform:translate(0, 10px)}} @-webkit-keyframes dd{0% {-webkit-transform:translate(0, 10px)} 50% {-webkit-transform:translate(0, 0)}100% {-webkit-transform:translate(0, 10px)} } Note: The animation attribute must be used in conjunction with @keyframes The percentage means the percentage of duration. If duration is not set, it means is infinity. transform:translate(): Meaning - change, displacement; also a new attribute in CSS3.
Related labels:
source:php.cn
Previous article:After Qiniu uploads it, how to customize the upload completion process and display it on the page. _html/css_WEB-ITnose
Next article:Back-end coders talk about front-end (CSS) Lesson 8: Inheritance and cascading_html/css_WEB-ITnose
Statement of this Website
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
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
|