动画 div 背景图像

发布于 2024-08-07 23:50:45 字数 911 浏览 3 评论 0原文

我有一个

<div class="hide1" id="MDive">
    <TABLE WIDTH="1000" BORDER=0 CELLPADDING=0 CELLSPACING=0>

在这个

中,我拥有页面的完整主体。

我也有两个类:

<style>
    .hide1 {
        background: url(bgs/bg_first.png) no-repeat;
    }
    .hide2 {
        background: url(bgs/Picture-12_SOFT.jpg) no-repeat;
    }
</style>    

我的主体中有一个图像:

<div class="mover">
    <IMG SRC="images/buttons_full_03.png" WIDTH=129 HEIGHT=30 ALT="" border="0">
</div>

我需要的是:当光标移到 div.mover 上时,div#MDive 的类发生变化使用动画hide2

即:div#MDive的背景图片变为第二张图片并带有动画效果

I have a <div>:

<div class="hide1" id="MDive">
    <TABLE WIDTH="1000" BORDER=0 CELLPADDING=0 CELLSPACING=0>

In this <div> I have the complete body of the page.

I also have two classes:

<style>
    .hide1 {
        background: url(bgs/bg_first.png) no-repeat;
    }
    .hide2 {
        background: url(bgs/Picture-12_SOFT.jpg) no-repeat;
    }
</style>    

I have one image in the body:

<div class="mover">
    <IMG SRC="images/buttons_full_03.png" WIDTH=129 HEIGHT=30 ALT="" border="0">
</div>

What I need is: when the cursor comes over the div.mover, div#MDive's class changes to hide2 with an animation.

i.e.: div#MDive's background image changes to the second image with an animation effect

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

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

发布评论

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

评论(1

请持续率性 2024-08-14 23:50:45

您需要查看 JQUery.Hover 事件

http://docs.jquery.com/Events/hover

然后是你的动画事件,

http://docs.jquery.com/API/ 1.3/效果

另一个顶部:更改背景图像时查看不透明度。

皮诺

You need to look at the the JQUery.Hover event

http://docs.jquery.com/Events/hover

And then your animate event,

http://docs.jquery.com/API/1.3/Effects

Another top: look into Opacity when changing the background image.

Pino

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文