In CSS, you can apply the invert effect to elements using the filter property. The invert effect essentially reverses the colors of an element, creating a negative or inverted appearance.
Here's how you can use the invert effect in CSS:
.invert-element {
filter: invert(100%);
}
in this example:
You can adjust the percentage value to control the intensity of the inversion. For example, invert(50%) would result in a partial inversion, preserving some of the original colors.
Here's another example with partial inversion:
.partial-invert-element {
filter: invert(30%);
}
In this case, the .partial-invert-element class applies a 30% inversion effect, resulting in a partial reversal of colors.
The invert effect can be used to create unique visual effects and color transformations in your web designs. It's a creative tool to experiment with to achieve specific visual styles or to add variety to your content.
Select Language
Set theme
© 2024 ReadyTools. All rights reserved.