如何在悬停图像时停止图像

编程入门 行业动态 更新时间:2024-10-24 18:18:09
本文介绍了如何在悬停图像时停止图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用html标记标签在其中移动图像. 每当鼠标悬停在图像上时,我都想停止图像移动. 我正在使用此代码

I am using a html marque tag in which i am moving images. I want to stop the image moving whenever i hover the mouse on it. I am using this code

<marquee loop="infinite" > <asp:Image ID="Img1" name="img1" runat="server" Height="100" Width="80" ImageUrl="~/images/sonyd.jpg" onmouseover="this.setAttribute('scrollamount', 0, 0);" onmouseout="this.setAttribute('scrollamount', 6, 0);"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Image ID="Image2" runat="server" Height="100" Width="80" ImageUrl="~/images/camc.jpg"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Image ID="Image3" runat="server" Height="100" Width="80" ImageUrl="~/images/laptop.jpg"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Image ID="Image4" runat="server" Height="100" Width="80" ImageUrl="~/images/galaxy.jpg"/></marquee>

但它不起作用. 当我在marque标签中编写事件时,它可以工作,但是当我将鼠标悬停在图像上而不是在任何其他pLACE IN MARQUE标签上时,我想停止它.

but its not working. When i write event in marque tag it works but i want to stop it when i hover on image and not on any other pLACE IN MARQUE tag.

推荐答案

按以下方式停止首先不要使用字幕.马克是邪恶的.对于许多用户来说,这是完全避免访问您的网站的充分理由.
—SA
Stop it by not using marque in first place. Marque is evil. For many users, this is a sufficient reason to avoid your Web site completely.
—SA

参见此类似问题 当鼠标悬停在链接上时,请停止选取字幕 [ ^ ] 如何在鼠标悬停在如何降低字幕的速度 [ ^ ] See this, similar question Stop marquee when mouse over link[^] how to stop marquee on mouse over and how to slow speed of marquee[^]

用作 <marquee onmouseover="this.stop();" onmouseout="this.start();" SCROLLAMOUNT=5> <asp:image id="Image3" runat="server" height="100" width="80" imageurl="~/images/laptop.jpg" xmlns:asp="#unknown" /> <asp:image id="Image4" runat="server" height="100" width="80" imageurl="~/images/galaxy.jpg" xmlns:asp="#unknown" /> </marquee>

更多推荐

如何在悬停图像时停止图像

本文发布于:2023-11-12 18:52:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582263.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!