Home  >  Article  >  Web Front-end  >  How to make images shrink until they disappear in css3

How to make images shrink until they disappear in css3

WBOY
WBOYOriginal
2021-12-14 17:14:233087browse

Method: 1. Use the "animation: name time" style to bind animation to the picture element; 2. Use "@keyframes name {0%{transform:scale(1,1);}100%{transform :scale(0,0);}}" statement can make the image shrink until it disappears.

How to make images shrink until they disappear in css3

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

css3 How to make the picture shrink until it disappears

In css, you can use the animation attribute to bind animation to the picture element and specify the animation time .

The keyframes rules are then used to specify the action of element animation. The specific action is based on the transform attribute and the scale function to scale the element.

The example is as follows:




    
    
    
    Document
    

Output result:

How to make images shrink until they disappear in css3

##(Learning video sharing:

css video tutorial

The above is the detailed content of How to make images shrink until they disappear 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