鼠标移动图片向上滚动
来源:互联网 发布:pptv网络电视官方 编辑:程序博客网 时间:2024/04/29 13:15
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>中国站长天空-网页特效-图片特效-鼠标悬停图片上下或左右滑动的效果</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<!--把下面代码加到<head>与</head>之间-->
<style type="text/css">
html,body,div,img{margin:0;padding:0;border:none;}
html{font:1em Arial,Helvetica,sans-serif;color:#444;}
h1{text-align:center;}
.clear{overflow:auto;}
#vertical,#horizontal{margin:50px auto;width:909px;}
#vertical div,#horizontal div{margin-right:3px;float:left;width:296px;height:130px;border:1px solid #999;position:relative;overflow:hidden;}
#vertical img,#horizontal img{position:absolute;}
</style>
<script type="text/javascript" src="http://www.zzsky.cn/effect/images/201310/131700/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
//Vertical
$("#vertical div a").hover(function(){
$("img",this).stop().animate({top:"-130px"},{queue:false,duration:200});
},function(){
$("img",this).stop().animate({top:"0px"},{queue:false,duration:200});
});
//Horizontal
$("#horizontal div a").hover(function(){
$("img",this).stop().animate({left:"-296px"},{queue:false,duration:200});
},function(){
$("img",this).stop().animate({left:"0px"},{queue:false,duration:200});
});
});
</script>
</head>
<body>
<!--把下面代码加到<body>与</body>之间-->
<div id="vertical" class="clear"><!-- Vertical -->
<h1>jQuery image slide on hover effect (vertical)</h1>
<div><a href="http://blog.163.com/chen_hui/blog/#"><img src="http://www.zzsky.cn/effect/images/201310/131700/image-1.jpg" alt=""></a></div>
<div><a href="http://blog.163.com/chen_hui/blog/#"><img src="http://www.zzsky.cn/effect/images/201310/131700/image-2.png" alt=""></a></div>
</div>
<div id="horizontal" class="clear"><!-- Horizontal -->
<h1>jQuery image slide on hover effect (horizontal)</h1>
<div><a href="http://blog.163.com/chen_hui/blog/#"><img src="http://www.zzsky.cn/effect/images/201310/131700/image-3.jpg" alt=""></a></div>
<div><a href="http://blog.163.com/chen_hui/blog/#"><img src="http://www.zzsky.cn/effect/images/201310/131700/image-4.png" alt=""></a></div>
</div>
</body>
</html>
转自:http://www.zzsky.cn
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>中国站长天空-网页特效-图片特效-鼠标悬停图片上下或左右滑动的效果</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<!--把下面代码加到<head>与</head>之间-->
<style type="text/css">
html,body,div,img{margin:0;padding:0;border:none;}
html{font:1em Arial,Helvetica,sans-serif;color:#444;}
h1{text-align:center;}
.clear{overflow:auto;}
#vertical,#horizontal{margin:50px auto;width:909px;}
#vertical div,#horizontal div{margin-right:3px;float:left;width:296px;height:130px;border:1px solid #999;position:relative;overflow:hidden;}
#vertical img,#horizontal img{position:absolute;}
</style>
<script type="text/javascript" src="http://www.zzsky.cn/effect/images/201310/131700/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
//Vertical
$("#vertical div a").hover(function(){
$("img",this).stop().animate({top:"-130px"},{queue:false,duration:200});
},function(){
$("img",this).stop().animate({top:"0px"},{queue:false,duration:200});
});
//Horizontal
$("#horizontal div a").hover(function(){
$("img",this).stop().animate({left:"-296px"},{queue:false,duration:200});
},function(){
$("img",this).stop().animate({left:"0px"},{queue:false,duration:200});
});
});
</script>
</head>
<body>
<!--把下面代码加到<body>与</body>之间-->
<div id="vertical" class="clear"><!-- Vertical -->
<h1>jQuery image slide on hover effect (vertical)</h1>
<div><a href="http://blog.163.com/chen_hui/blog/#"><img src="http://www.zzsky.cn/effect/images/201310/131700/image-1.jpg" alt=""></a></div>
<div><a href="http://blog.163.com/chen_hui/blog/#"><img src="http://www.zzsky.cn/effect/images/201310/131700/image-2.png" alt=""></a></div>
</div>
<div id="horizontal" class="clear"><!-- Horizontal -->
<h1>jQuery image slide on hover effect (horizontal)</h1>
<div><a href="http://blog.163.com/chen_hui/blog/#"><img src="http://www.zzsky.cn/effect/images/201310/131700/image-3.jpg" alt=""></a></div>
<div><a href="http://blog.163.com/chen_hui/blog/#"><img src="http://www.zzsky.cn/effect/images/201310/131700/image-4.png" alt=""></a></div>
</div>
</body>
</html>
转自:http://www.zzsky.cn
0 0
- 鼠标移动图片向上滚动
- 图片向上无缝滚动
- 图片向上滚动
- 图片无缝向上滚动
- 图片向上移动效果
- 文字向上滚动,鼠标悬停停止滚动
- scrollLeft() 妙用 鼠标移动 反方向图片滚动
- 图片无缝向上滚动代码
- Js图片匀速向上滚动
- 鼠标移到向上或向下的图片上,文本自动滚动
- 鼠标移到向上或向下的图片上,文本自动滚动
- 图片滚动查看与文字向上滚动
- 鼠标移动控制对象滚动.
- 文字或者图片向上滚动代码
- 文字或者图片向上滚动代码
- 向上滚动,并且每张图片停两秒
- 图片连续循环滚动代码(向上)
- Javascript控制图片间歇性轮换向上滚动
- display:inline-block在ie6,7下无法识别解决方法
- 移动端垂直翻页+css3动画经验总结
- 【转载】sql语句使用,内连接,外连接
- 关于英文内容页面无法换行
- 设置div的最小高度并且自适应高度
- 鼠标移动图片向上滚动
- 背景图拉伸效果兼容各种浏览器
- 解决IE浏览器li下list-style-type无效的问题
- 使用viewFilpper,实现左右滚动的相册
- 【转载】JS实现淘宝 放大镜效果
- 首页banner图轮播效果
- 背景图片切换效果
- 弹出层设置z-index后在浏览器中的兼容性
- ie兼容问题