IE6 a tag switching background image cannot take effect immediately_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:44:15
Original
1347 people have browsed it

Now we are encountering a compatibility problem. Under IE6, onclick switches the background image of the a tag. The style has been changed, but the background image has not changed. You need to move the mouse out and in to change the background image. How can I change this so that the background image can be modified immediately after the click event is triggered. PS: Changing to span can achieve this effect, but other problems will occur, so I still use the a tag.


Reply to the discussion (solution)

This is definitely not a compatibility issue, there must be a problem with your code.

Other browsers don’t have this problem

Use js to directly modify the src attribute of img, right? I remember that there is indeed a problem under IE6, you can consider changing the img method

Could you please solve it? I also encountered a similar problem

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template