Home  >  Article  >  Web Front-end  >  IE6 a标签 切换背景图片 不能立即生效_html/css_WEB-ITnose

IE6 a标签 切换背景图片 不能立即生效_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:44:151290browse

现在遇到一个兼容性问题,IE6下onclick切换a标签的背景图片,样式已经改了,但是背景图片没有改变,需要鼠标移出移入背景图片才发生变化。这要怎么改,来实现触发click事件后立即修改背景图片。PS:改成span能实现此效果,但会有其他问题出现,所以还是用a标签。


回复讨论(解决方案)

这肯定不是兼容的问题,一定是你代码有问题。

其他浏览器就没有这种问题

用js直接修改了img 的src属性吧?记得IE6下确实有问题的,可以考虑换img的方法

请问楼主解决了吗 我也遇到了类似的问题

Statement:
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