D
D
dojdimon2015-11-12 16:42:24
HTML
dojdimon, 2015-11-12 16:42:24

How to smoothly light up an image?

Task:
you need to make a smooth transition from gray to blue in the picture on the site when you hover over it
Picture in png format with a colorless background.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
tigra, 2015-11-12
@tigroid3

An example is needed to say for sure, there are actually a lot of options: -
you can put a color picture

transition:1s;
-webkit-filter: grayscale(100%);

and with hover
, you can make a block with a transparency of 50 on top of the picture, and change the color of the block on hover

M
Mikhail, 2015-11-12
Chirskiy @chirskiy_mixail

If you need blue or some other, google towards filter: hue-rotate
and here is an example on htmlacademy https://htmlacademy.ru/courses/97/run/4

A
Alexander Zachinalov, 2015-11-12
@SanDiesel

changing the color palettes of bitmaps on the web is currently only possible using the filter properties . But for now, only Webkit supports this approach. If you have declared cross-browser compatibility, then it is better to have two different images and with a hover delay, hide one and show the other.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question