使用 #map 将鼠标悬停在图像上时更改图像

发布于 2024-12-24 20:32:50 字数 226 浏览 4 评论 0原文

我已添加到此网站的数据库连接并使其动态化。网站的设计已经完成,我只是添加了数据库连接。

一切都很好,但现在我已经添加了 jQuery Carousel,但是当我用鼠标悬停时,我无法更改菜单的图像(即菜单、公司简介等)。

我尝试了所有可能的方法(我看到菜单是用#map设计的),但我无法解决这个问题。

I have added a database connection to this site and made it dynamic. The design of the website was already done, I just added the database connection.

Everything's fine, but now I had added the jQuery Carousel, but I can't change the image of menu (i.e. menu,company profile etc.) when I hover with the mouse.

I tried all possible things (I saw that the menus are designed with #map) but I couldn't solve this problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我偏爱纯白色 2024-12-31 20:32:50

以下是主页按钮的 jQuery 示例:

$("table:first table:first tr:eq(1) td:first img").hover(function() {
    $(this).attr("src", "image.jpg");
},
function() {
    $(this).attr("src", "home.jpg");
});

应在您的页面上完成的其他修复:

  • `webticker_lib.js` 文件未在使用中。 (带有 id TICKER 的元素不存在)
  • 您调用 onload 的函数 goforit 未在任何地方定义。
  • 请添加光标:指针;到下拉菜单
  • 请向选框添加 15 像素内边距(左右):
marquee {
    padding: 0 15px;
}

Here is a jQuery example for the home button:

$("table:first table:first tr:eq(1) td:first img").hover(function() {
    $(this).attr("src", "image.jpg");
},
function() {
    $(this).attr("src", "home.jpg");
});

Additional fixes which should be done on your page:

  • The `webticker_lib.js` file isn't in use. (The element with the id TICKER doesn't exists)
  • The function goforit which you call onload isn't defined anywhere.
  • Please add cursor: pointer; to the drop down menu
  • Please add 15px padding (right and left) to the marquee:
marquee {
    padding: 0 15px;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文