Languages
[Edit]
EN

CSS - fade out effect

3 points
Created by:
Maison-Humphries
791

In this article, we would like to show you how to create fade out effect using CSS.

Quick solution:

Hints:

  • we can change fadeout animation name to our own,
  • we can use many different @keyframes in styles simultaneously.

 

Practical example

Edit

In this example, we present how to use @keyframes to create fadeout animation that goes from opacity: 1 to opacity: 0 making the element invisible over specified time (3s).

Keyframes with percentage value

Edit

You can also divide @keyframes animations into more parts using percentage values instead of from and to keywords.

Note: you can put much more middle states between 0% and 100% inside @keyframes.

 

See also

Edit
  1. CSS - fade in effect

  2. CSS - keyframes animations

References

Edit
  1. @keyframes - CSS: Cascading Style Sheets | MDN
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join