Jquery实现简单的图片滚动效果
来源:互联网 发布:结婚照下载什么软件 编辑:程序博客网 时间:2024/04/29 21:42
<!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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>图片滚动</title><script type="text/javascript" src="js/jquery-1.9.1.js"></script><style type="text/css"> body,ul,li { padding:0; margin:0} ul,li { list-style:none}.person_pic{ width:72%; height:auto; margin-top:18%; margin-left:28%;}.per-pic-scroll {height:200px; position:relative;margin-top:5%; margin-left:10px;}.per-pic-scroll .pre,.per-pic-scroll .next { position:absolute; display:block; width:35px; height:50px; background-color:#999999;top:23px; color:#FFF; text-align:center; line-height:50px;}.per-pic-scroll .pre { left:16px}.per-pic-scroll .next { right:50px}.img-list { position:relative; width:78%; height:150px; margin-left:60px; overflow:hidden}.img-list ul { width:200%;} //这里一定要大点.img-list li { float:left; display:inline; width:135px; margin-right:10px; height:150px; background-color:#BDBDDF; text-align:center; line-height:100px;}.img-list li img{width:135px; height:150px;}.per-pic-scroll a{ text-decoration:none; }</style><script type="text/javascript">function Per_pic_scroll(){ var pre_person , next_person , image , wid; pre_person = $(".pre") , next_person = $(".next") , image = $(".img-list").find('ul'); wid = $(".img-list").find('ul').find("li").outerWidth(false); next_person.click(function(){image.animate({'margin-left':-wid},function() { image.find('li').eq(0).appendTo(image); image.css({'margin-left':0}); });}); pre_person.click(function(){image.find('li:last').prependTo(image);image.css({'margin-left':-wid});image.animate({'margin-left':0});});}$(function(){ Per_pic_scroll();})</script></head><body> <div class="person_pic"><div class="per-pic-scroll"> <span class="pre"><a href="#" onclick="return false"><</a></span> <span class="next"><a href="#" onclick="return false">></a></span> <div class="img-list"> <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> <li>9</li></ul> </div> </div> </div></body></html>
0 0
- Jquery实现简单的图片滚动效果
- jQuery+CSS实现的图片滚动效果
- Jquery实现简单的滚动刷新效果
- jquery实现图片滚动效果
- jquery实现简单的图片翻转效果
- jquery实现可控方向的图片滚动效果
- JQuery实现文字滚动效果-最简单的方法
- jquery实现图片左右滚动效果
- JQuery实现图片轮播滚动效果
- 简单的jQuery无缝向上滚动效果
- 简单的图片、文字滚动效果
- 实现简单的图片滚动
- jQuery实现滚动效果
- Jquery 滚动效果实现
- jquery实现文字的上下滚动效果
- JQuery实现数字滚动增加的效果
- 简单的jquery图片滚动插件
- js实现图片的点击滚动效果
- iOS开发UI篇—自定义瀑布流控件(接口设计)
- C++中Lambda表达式
- C语言外部变量的使用以及erxtern的用法
- Fast Paxos
- Android Activity 平滑水平切换动画
- Jquery实现简单的图片滚动效果
- 教你轻松使用XMLHttpRequest对象
- libgdx中BitmapFont字体的使用
- IO多路复用之select总结
- Struts2中Result类型介绍
- 董阿姨要做手机了?
- feidai API接口详情
- RAND函数和SRAND函数
- 软考:IPSec基本配置命令 很有用