默认九宫格图片排列效果,当鼠标悬停在图片上后,会从图片的上方下滑一个半透明遮罩的效果

同时出现一些文字介绍

使用方法:

1、将head中的css样式引入到你的网页中
2、将代码部分拷贝到你的网页body结束前的地方即可
(js、图片采用绝对路径,不建议修改)

复制代码 代码如下:
$(function(){
    $('.sgw_img dt').hover(function(){
        $(this).children('.box').stop(true,true).delay(100).animate({'top':0,opacity:0.8},300);
    },function(){
        $(this).children('.box').stop(true,true).animate({'top':-482,opacity:0},200);
    })
    $('.sgw_img dd').hover(function(){
        $(this).children('.box').stop(true,true).delay(100).animate({'top':0,opacity:0.8},300);
    },function(){
        $(this).children('.box').stop(true,true).animate({'top':-382,opacity:0},200);
    })
})

以上就是本文分享的全部内容了,希望大家能够喜欢。

标签:
jQuery,图片,遮罩,半透明,遮挡

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com

评论“使用jQuery实现图片遮罩半透明坠落遮挡”

暂无“使用jQuery实现图片遮罩半透明坠落遮挡”评论...