
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
Working with CSS3 Filter Effects
To set Filter Effects in CSS3, use the filter property. Following filter effects can be set −
blur() | brightness() | contrast() | grayscale() | invert() | opacity() | saturate() | url();
Following is the code for using filter effects in CSS3 −
Example
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> img{ margin: 20px; width: 200px; height: 200px; } img.normal{ margin-left: 30%; } img.filter { filter: invert(100%); } </style> </head> <body> <h1 style="text-align: center;">CSS3 Filter effect example</h1> <img class="normal" src="https://i.picsum.photos/id/237/536/354.jpg"> <img class="filter" src="https://i.picsum.photos/id/237/536/354.jpg"> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- Working with CSS3 2D Transform Functions
- Working with CSS3 3D Transform Functions
- Understanding the CSS3 Filter Functions
- How to create CSS3 Transition Effects?
- How to create CSS3 Box and Text Shadow Effects?
- Effects of Undersampling (Aliasing) and Anti-Aliasing Filter
- Media queries with CSS3
- HTML5 SVG css3 transition on fill not working when there is external link
- Filter array with filter() and includes() in JavaScript
- Extending User Interface with CSS3
- Adding Multiple Backgrounds with CSS3
- Shadow Filter with CSS
- Filter table with Bootstrap
- Z-axis 3D transform with CSS3
- Y-axis 3D transform with CSS3

Advertisements