使用 CSS 設定反色效果


反色效果用於將物件的 color 中的值對映到色譜中的相反值,也就是說,建立負片影像。

該濾鏡中使用以下引數:

序列號引數和描述
1
反色
將物件的 color 對映到 color 中的相反值。

示例

你可以嘗試執行以下程式碼來實現反色效果:

即時演示

<html>
   <head>
   </head>
   <body>
      <img src = "/images/css.gif" alt = "CSS Logo" style = "Filter: invert" />
      <p>Text Example:</p>
      <div style = "width: 357; height: 50; font-size: 30pt; font-family: Arial Black;
         color: red; Filter: invert">
         CSS Tutorials
      </div>
   </body>
</html>

更新時間: 27-Jun-2020

瀏覽次數:237

開啟您的職業生涯

完成課程認證

開始學習
廣告
© . All rights reserved.