Home > Web Front-end > CSS Tutorial > How to turn images gray with css in firefox

How to turn images gray with css in firefox

王林
Release: 2020-12-22 16:52:53
Original
2022 people have browsed it

How to turn images into gray using CSS in Firefox: This can be achieved through the attribute [-webkit-filter:grayscale(100%);]. The filter attribute defines the visual effects of the element, such as blur and saturation.

How to turn images gray with css in firefox

The operating environment of this tutorial: Windows 10 system, HTML5&&CSS3 version. This method is suitable for all brands of computers.

(Recommended tutorial: css video tutorial)

Attribute introduction:

filter attribute defines the content of the element (usually How to turn images gray with css in firefox) Visual effects (such as blur and saturation).

Attribute value:

grayscale(%) Convert the image to grayscale image. The value defines the scale of the conversion. If the value is 100%, the image will be completely converted to grayscale, and if the value is 0%, the image will remain unchanged. Values ​​between 0% and 100% are linear multipliers of the effect. If not set, the value defaults to 0;

Code example:

How to turn images gray with css in firefox

Implementation effect:

How to turn images gray with css in firefox

(Related recommendations: CSS tutorial)

The above is the detailed content of How to turn images gray with css in firefox. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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