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
FIFO communication (first in first out) FIFO name...
In fact, it is very simple to achieve this effect,...
Table of contents 1. Developer Platform Configura...
Table of contents Why is IN slow? Which is faster...
CSS style specifications 1. Class Selector 2. Tag...
Label display mode (important) div and span tags ...
I recently joined a new company and found some mi...
Table of contents 1. Problem Description 2. Probl...
Preface This article records a problem I encounte...
Preface As we all know, the nginx configuration f...
A recent business involves such a requirement tha...
Preface This article will explain how Vue compone...
Table of contents 1. Basic Concepts of GTID 2. GT...
Six steps of JDBC: 1. Register the driver 2. Get ...
Data Type: The basic rules that define what data ...