使用 CSS 設定反轉效果


反轉效果用於將物件的各種顏色對映到色譜中與之相反的值,即建立負像。

此濾鏡使用以下引數:

序號引數 & 說明
1
反轉
將物件的顏色對映到色譜中與之相反的值。

示例

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

線上演示

<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>

更新於: 2020-06-27

237 次瀏覽

成就你的 事業

透過完成課程獲得認證

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