Change color of image in javascript

前端 未结 4 1401
滥情空心
滥情空心 2020-12-18 01:47

I want to change the color of a map image dynamically (say from blue to red). And I can\'t use canvas as I have to support IE.Any idea how i can manipulate an image on clien

4条回答
  •  情话喂你
    2020-12-18 02:30

    Currently IE supports canvas starting from IE 9, so it is possible to convert to canvas and manipulate the image in IE.

    you can consider this jquery plugin. It is easy to use.

    $("#myImageID").tancolor();
    

    There's an interactive demo. You can play around with it.

    Check out the documentation on the usage, it is pretty simple. docs

提交回复
热议问题