Languages
[Edit]
EN

CSS - multiple filters at once

0 points
Created by:
Inayah-Alexander
767

In this article, we would like to show you how to add multiple filters at the same time using CSS.

Quick solution:

.element {
    filter: invert(1) blur(5px); /* adds invert() and blur() filters */
}

 

Practical example

In order to add multiple filters at the same time to the element, we just need to assign one by one without using any separators. In this example, we used invert() and blur() filter at once.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <style>

    .element {
        width: 50px;
        height: 50px;
        background: green;
        filter: invert(1) blur(5px); /* inverts green background and adds blur */
    }

  </style>
</head>
<body>
  <div class="element"></div>
</body>
</html>

 

See also

  1. CSS - multiple transformations at once

References

  1. filter - CSS: Cascading Style Sheets | MDN

Alternative titles

  1. CSS - multiple filters at the same time
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