Today, all web pages are grayed out all over the world, right. Whether or not the mourning lies in whether a person's heart is kind. On the surface, it makes a video website unable to search for a webpage with no color. what is the significance? Chrome
Technically, the most secure way to achieve gray-scale web pages is to directly process all images without considering compatibility or efficiency. However, it takes a lot of effort to switch back.
The ie series supports css filters. filter: gray solves all problems. However, as we all know, ie is famous for its low efficiency. you will find that the speed will decrease significantly after it is enabled. In addition, the most fatal one is invalid in other browsers.
Is there any way to be compatible with all browsers? Yes. JavaScript can do, someone has long used JavaScript to simulate the ie gray filter, if you are interested and willing to read English, you can go to see "GRAYSCALING" IN NON-IE BROWSERS. If you don't want to see it, I can tell you how to use it.
1. download the grayscale. js file
2. reference this js file in your header