Home
CSS
CSS Images Filters
Tryit: The invert() function
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> #img1 { filter: invert(0.3); } #img2 { filter: invert(70%); } #img3 { filter: invert(100%); } </style> </head> <body> <h1>The invert() Function</h1> <p>invert(0.3):</p> <img id="img1" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <p>invert(70%):</p> <img id="img2" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <p>invert(100%):</p> <img id="img3" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <p>Original image:</p> <img src="pineapple.jpg" alt="Pineapple" width="300" height="300"> </body> </html>