Implementation Method for changing the browser Gray:
1. The simplest and most direct way is to gray the image. (Suitable for modifying a small number of images and compatible browsers)
2. Use filters (ie filter and css3 filter) for control, such as (being able to modify all elements (including images), compatible with IE series and WebKit series)
-WebKit-filter: grayscale (100%);-o-filter: grayscale (100%);-MS-filter: grayscale (100%); filter: grayscale (100%); filter: progid: DXImageTransform. microsoft. basicimage (grayscale = 1 );
3. Use the grayscale plug-in (Official Website: http://james.padolsey.com/javascript/grayscaling-in-non-ie-browsers ),
It is mainly used to convert the gray image through canvas, and use data: image/PNG; base64 to re-copy SRC.
(Compatible with most browsers, including Firefox. However, we recommend that you only have firefox call the grayscale plug-in to modify the specified image .)
Grayscale. JS:Http://james.padolsey.com/demos/grayscale/grayscale.js