Baseline Widely available
The invert()
CSS function inverts the color samples in the input image. Its result is a <filter-function>
.
<section id="default-example">
<img
class="transition-all"
id="example-element"
src="/shared-assets/images/examples/firefox-logo.svg"
width="200" />
</section>
Syntax Parameters
amount
Optional
The amount of the conversion, specified as a <number>
or a <percentage>
. A value of 100%
is completely inverted, while a value of 0%
leaves the input unchanged. Values between 0%
and 100%
are linear multipliers on the effect. The initial value for interpolation is 0
. The default value is 1
.
<invert()> =Examples Examples of correct values for invert()
invert( [ <number> | <percentage> ]? )
invert(0) /* No effect */
invert(.6) /* 60% inversion */
invert() /* Completely inverted */
invert(1)
invert(100%)
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4