html使用onmouseover事件怎么设置鼠标移动到图片或者文字上在旁边弹出一个图片介绍

2025-04-17 05:14:54

这样:

争犸禀淫<Ahref=""><imgsrc="../images/yumen.jpg"onmous髫潋啜缅eover="this.src='../images/yumen1.jpg'"onmouseout="this.src='../images/yumen.jpg'"width="100"height="28"></A>...

//设置一个div,但是默认却是隐藏起来的。

.s1{

position: absolute;

display: none;

}

// js

function show(){

document.getElementById("s1").style.display="block";

}

function dis

html使用onmouseover事件怎么设置鼠标移动到图片或者文字上在旁边弹出一个图片介绍

扩展资料:

注意事项

html部分:需要注意的是,用于显示图片的DIV需要放在body第一子节点,不然会出现定位错误<body>

<div id="box" class="col-md-4 col-md-offset-4"

<table class="table table-hover">

<thead>

<tr>

<th class="text-info" colspan="4">

天涯书城书目 </th>

</tr>

<tr>

<th>书名</th>

<th>作者</th>

<th>售价</th>

<th>书类</th>

</tr


</thead>

<tbody>

<tr onmouseout="hiddenPic()" onmousemove="showPic('img/0.png')">

<td>

新华字典 </td>

<td>
新华出版社 </td>

<td>
32.5 </td>

<td>
工具书 </td>

</tr>

</tbody>

</table>

</div>

<div id="Layer1" style="display:none;position:absolute;z-index:1;"></div></body>

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢