Home  >  Article  >  Web Front-end  >  Set the invert effect using CSS

Set the invert effect using CSS

PHPz
PHPzforward
2023-09-05 19:53:051326browse

使用 CSS 设置反转效果

The Invert effect is used to map the color of an object to the opposite value in the color spectrum, creating a negative image.

The following parameters are used in this filter:

Sr.No Parameters and Description

1

Invert

Map the color of an object into the color spectrum the opposite value.

Example

You can try running the following code to achieve the inversion effect:

Live Demonstration

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

The above is the detailed content of Set the invert effect using CSS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete