css - Is there any way to change the image color? -
is there way alter color of img
(not background) using css?
i mean there image , on hover want darken it, best way it? , yes possible without using opacity?
you can utilize css filters, example:
change saturation:
-webkit-filter: hue-rotate(270deg);
or alter brightness:
-webkit-filter: brightness(.5);
example:
http://jsfiddle.net/m9sjdbx6/3/
http://jsfiddle.net/m9sjdbx6/4/
<img src="http://2.bp.blogspot.com/-haoq_drzm1e/ub6s63_iqxi/aaaaaaac9hc/2mfbjjeqnos/s1600/blind+chess-board.jpg"></img>
saturation (color):
img:hover { -webkit-filter: hue-rotate(270deg); }
brightness:
img:hover { -webkit-filter: brightness(0.2); }
css css3
No comments:
Post a Comment