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

Set the invert effect using CSS

PHPz
Release: 2023-09-05 19:53:05
forward
1406 people have browsed it

使用 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>
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template