A
A
a-lexus91_yandex2014-07-21 11:19:02
PHP
a-lexus91_yandex, 2014-07-21 11:19:02

When you hover over a link, the image changes with a delay. How to fix?

I made a button that will occupy a permanent place on the screen. When you hover over it, I want to change the color. The first thing that came to mind was to simply add another picture to the hover. But the browser does not immediately load it, but only when hovered over. Because of this, a delay of several seconds , which is very ugly - the old picture disappeared, but the new one did not appear .
How to fix?

PS problem on skfu.org

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Lobanov, 2014-07-21
@iiil

Combine the picture into one, inactive on the left, active on the right (or top / bottom).
You have a .banner-left class there, write different background-positions for the normal state and for hover in it. For normal state left, for hover - right.

A
Andrey Golumenov, 2014-07-21
@Golumenov

You can use a sprite or use css filters , in case the picture is the same and the color scheme changes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question