Warm tip: This article is reproduced from serverfault.com, please click

Using javascript to show a grey-scale version of an image on mouse-over

发布于 2009-10-29 13:04:06

I need a way to display a grayscale version of an image on mouseover. I've seen this implemented using the Canvas functionality of the browser but don't want to use that method as it will be a while before canvas is implemented on all browsers.

Has anyone done such a thing?

Questioner
Gaurav Sharma
Viewed
0
2017-05-23 18:28:21

If you don't use Canvas and dont want to utilize browser-specific features, you are going to need to generate your grayscale images on the server. Either beforehand or on demand. How to do That has been answered elsewhere on SO