嗨,如何在鼠标悬停时将背景图像设置为另一个图像(Html图像) [英] Hi,How can i set the background image on mouseover to the another image(Html image)

查看:89
本文介绍了嗨,如何在鼠标悬停时将背景图像设置为另一个图像(Html图像)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面中有一个Html图像。我想在鼠标悬停时将背景图像设置为该图像。我尝试了很多,但是,如果你知道解决方案,请告诉我。

I have one Html image in my page.I want to set the background image to that image on mouse over. I tryed a lot but, i did''t get please let me know if you know the solution

推荐答案

不确定,但试一试:)

Not sure, but give it a try :)
<div>
  <a href="tom.jpg">
    <img src="http://www.wmagency.co.uk/wp-content/uploads/2011/04/test.jpg">
         onmouseover='document.getElementById("table_id_here").style["background-image"]="url(\'jerry.jpg\');'
         width="72" height="54" alt="" />
  </img></a>
</div>


这篇关于嗨,如何在鼠标悬停时将背景图像设置为另一个图像(Html图像)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆