Use the grayscale effect to convert the color of the object to 256 levels of grayscale. The following parameters are used in this filter:
Parameters | Description | |
---|---|---|
Gray | Gray | Converts the color of the object to 256 levels of gray. |
You can try running the following code to set the grayscale effect:
Live Demo
<html> <head> </head> <body> <img src="/css/images/logo.png" alt="CSS Logo" style="Filter: Gray"> <p>Text Example:</p> <div style="width: 357; height: 50; font-size: 30pt; font-family: Arial Black; color: red; Filter: Gray">CSS Tutorials</div> </body> </html>
The above is the detailed content of Convert an object's color to 256 levels of grayscale using CSS. For more information, please follow other related articles on the PHP Chinese website!