1. Understanding of transition attributes 1. The transition attribute is a shorthand attribute that can be used to set four transition properties: transition-property The name of the CSS property for the transition effect (height, width, opacity, etc.). Note: If the transition-duration property is 0, no transition effect will occur. 2. The value of the gradient function: The gradient function is the transition-timing-function; The preset value of the Bezier curve Ease gradually increases, uniform speed, slows down cubic-bezier (0.25, 0.1, 0.25, 1) 3. Abbreviation: transition: css attribute name transition time gradient function value delay time; 2. Simple animation example operation 1. Insert two pictures first <div class="A"> <img src="img/taking medicine.jpg" alt=""> <img src="img/main_bg.jpg" alt=""> </div> 2. Set the style for the picture <style> .A { margin: auto 100px; height: 400px; width: 600px; position: relative; } .A img:nth-child(1) { height: 300px; width: 300px; position: absolute; } .A img:nth-child(2) { height: 300px; width: 300px; position: absolute; transition: opacity 3s ease-in 2s; } .A img:nth-child(2):hover { opacity: 0; } img { height: 300px; width: 300px; } </style> 3. The animation effect obtained is: Summarize The above is a detailed explanation of the transition attribute of simple CSS animation introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! |
<<: How to modify the "Browse" button of the html form to upload files
>>: How to quickly install nginx under Windows and configure it to start automatically
When Docker creates a container, it uses the brid...
CPU Load and CPU Utilization Both of these can re...
See: https://www.jb51.net/article/112612.htm Chec...
Preface In daily development, when we use MySQL t...
1.1 What is MySQL multi-instance? Simply put, MyS...
History always repeats itself surprisingly well. ...
Table of contents Class Component Functional Comp...
Since PostgreSQL is compiled and installed, you n...
The code looks like this: <!DOCTYPE html> &...
First is the idea We use the <input type="...
1. Create a table CREATE TABLE `student` ( `id` i...
Table of contents From father to son: Son to Fath...
Table of contents First, let's briefly introd...
What is keepalive? In normal development, some co...
MySQL UTF-8 encoding MySQL has supported UTF-8 si...