invert()
は CSS の関数で、入力画像の色サンプルを反転します。結果は <filter-function>
です。
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
構文
invert(amount)
引数
amount
- 変換の度合いで、
<number>
または<percentage>
で指定します。100%
の値では完全に反転され、0%
の値では入力が変更されないままになります。0%
と100%
の間の値は、効果の割合です。補間時の欠損値は0
です。
例
invert(0) /* 効果なし */
invert(.6) /* 60% 反転 */
invert(100%) /* 完全に反転 */