HTML Academy
Combining the drop-shadow Filters
CSS filters12/14
Back to the list of tasks
  • 1. Brightness and Contrast
  • 2. Grayscale and Sepia
  • 3. Invert and Saturate
  • 4. Color Rotation, hue-rotate
  • 5. Blur and Opacity
  • 6. Shadow, drop-shadow
  • 7. The Difference Between box-shadow and drop-shadow
  • 8. Applying CSS Filters to Text
  • 9. Challenge: Using Various Filters
  • 10. Combination of Filters
  • 11. Combining the drop-shadow Filters
  • 12. Animating CSS Filters
  • 13. Smooth Transitions and CSS Filters
  • 14. Challenge: Filter Combinations
Smooth Transitions and CSS Filters
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

Animating CSS Filters

Animations and smooth transitions can be applied to CSS filters.

For example, you can obtain a very original effect when you apply an infinitely looping animation to the hue-rotate color rotation filter for color photos.

By the way, CSS animation is covered in detail in the “Animation” section.

Let’s give it a try!

Comments

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Animating CSS Filters</title> <link href="course.css" rel="stylesheet"> <link href="style.css" rel="stylesheet"> </head> <body> <div class="compare"> <div class="compare-single hue-animate"> <img src="img/spb-7-full.jpg" alt=""> </div> </div> </body> </html>
CSS
@keyframes rotate-colors { 100% { } } .hue-animate img { animation: rotate-colors 2s linear infinite; }

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0
    1. In the 100% frame of the rotate-colors directive, set the color rotation filter to a value of 360deg.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.