Just technically, to achieve grayscale, the most secure way is to directly handle all images, regardless of compatibility, regardless of efficiency. However, the workload is relatively large, switching back also laborious.
IE Series support CSS filter, a sentence filter:gray; It solves all the problems. But, as we all know, IE is famous for its inefficiency, you will find that the speed of the opening is significantly reduced. And, most deadly, is not valid under other browsers.
Is there a way to be compatible with all browsers? Yes. JavaScript can do, someone has already used JS simulation of IE's 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, I can tell you how to use it directly.
1. Download the Grayscale.js file
2. Refer to this JS file in your header
3. To achieve the full-station grayscale, call in the OnLoad event
Grayscale (document.body);
My theme background pictures more, processing more difficult, there may be some pictures disappear ...
I will turn this effect on for three days, if the problem caused by the processing of the theme is not normal to affect the browsing effect of the people are also forgive me. Anyway come here are acquaintances, to influence also on you a few ...
http://www.bkjia.com/PHPjc/324198.html www.bkjia.com true http://www.bkjia.com/PHPjc/324198.html techarticle just technically, to achieve grayscale, the most secure way is to directly handle all images, regardless of compatibility, regardless of efficiency. However, the workload is relatively large, switching ...