CSS: Gray filter is it cross-browser ... or as usual? If as usual, then advise how you can make an image in gray tones on mouseover, but not sprites.
|
2 answers
He is as usual. =) There are four ways: The first two assume this construction:
<div style="background-image: url()"><img src=""></div>
1) Sprites (what is bad? A gray image can be generated by a PHP script)
2) Two separate pictures (similar. Gray can be generated by PHP)
Two more - such: <img src="" onmouseover="">
There are no other cross-browser options, kakbe.
PS Any silverlight, flash and others - do not consider
|
Stretch the transparent picture with class = "gray", set a color background.
img.gray:hover{background-image:url('bgimage_gray.jpg');}
That's only if the pictures are different, they will each have to ask a similar garbage.
And the javascript solution won't suit you?
|