使用jQuery实现图片遮罩半透明坠落遮挡
作者:bea
默认九宫格图片排列效果,当鼠标悬停在图片上后,会从图片的上方下滑一个半透明遮罩的效果 同时出现一些文字介绍 使用方法: 1、将head中的css样式引入到你的网页中 2、将代码部分拷贝到你的网页body结束前的地方即可 (js、图片采用绝对路径,不建议修改) 代码如下: $(function(){ $('.sgw_img dt').hover(function(){ $(this).children('.box').stop(true,true).delay
默认九宫格图片排列效果,当鼠标悬停在图片上后,会从图片的上方下滑一个半透明遮罩的效果
同时出现一些文字介绍
使用方法:
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);
})
})
以上就是本文分享的全部内容了,希望大家能够喜欢。
有用 | 无用
同时出现一些文字介绍
使用方法:
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创建自定义的选择器用以选择高度大于100的超链接实例
- javascript中的Base64、UTF8编码与解码详解
- jQuery实现按键盘方向键翻页特效
- javascript操作Cookie(设置、读取、删除)方法详解
- jQuery选择id属性带有点符号元素的方法
- jQuery统计指定子元素数量的方法
- jquery让指定的元素闪烁显示的方法
- 多个jQuery版本共存的处理方案
- jquery通过closest选择器修改上级元素的方法
- jQuery判断元素上是否绑定了指定事件的方法
- jQuery验证元素是否为空的两种常用方法
- jQuery在ul中显示某个li索引号的方法
- jQuery支持动态参数将函数绑定到事件上的方法
- jQuery实现预加载图片的方法
- jQuery检测鼠标左键和右键点击的方法
- jQuery对指定元素中指定字符串进行替换的方法
- jQuery经过一段时间自动隐藏指定元素的方法
- input输入框鼠标焦点提示信息
- 原生JS实现LOADING效果