jquery那点事之写轮播图
来源:互联网 发布:网络电视蚂蚁 编辑:程序博客网 时间:2024/06/06 16:27
<!doctype html><html><head><meta charset="utf-8"><title>无标题文档</title><style type="text/css">#outer{ margin:50px auto; position:relative; width:400px; height:210px; overflow:hidden; }#inner{ width:2000px; position:absolute; top:0; left:0; height:210px; }#inner div{ width:400px; height:210px; float:left; background:darkBlue; text-align:center; line-height:210px; font-size:38px; font-weight:bold; color:#fff;}#outer ul{ width:160px; list-style:none; height:20px; line-height:20px; position:absolute; right:30px; bottom:20px;}#outer ul li{ float:left; margin:0 5px; width:20px; height:20px; background:orange; font-size:16px; font-weight:bold; text-align:center; cursor:pointer; }</style></head><body><div id="outer"><div id="inner"> <div >一一一一一红红</div> <div style="background:green;" >二二二二红红</div> <div style="background:black" >三三三三三红红</div> <div style="background:red" >四四四四四红红</div> <div style="background:purple" >五五五五五红红</div> </div> <ul><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li></ul></div></body></html><script src="jquery-1.7.1.js"></script><script>$("#outer>ul>li").click(function(){var index=$(this).index();$("#inner").stop().animate({left:index*-400},1500);})</script>
0 0
- jquery那点事之写轮播图
- jquery那点事之animate
- jquery那点事之写选项卡
- jquery那点事之下拉菜单
- jquery ui slider那点事
- 关于JQuery Validate的那点事
- 关于jquery插件的那点事!
- jquery.uploadify+jquery.form异步提交那点事
- USB之那点事汇总(十)
- STM32 USB那点事之6
- HTML那点事之【自我介绍】
- HTML那点事之【如何草船借箭】
- HTML那点事之【超链接】
- HTML那点事之【标签属性】
- GridView那点事之【自动编号】
- Mysql那点事之数据类型
- MySQL那点事之常见操作
- MySQL那点事之视图
- game4
- Opencv2.4.9源码分析——adaptiveBilateralFilter
- PHP采集程序原理分析篇
- Newtonsoft.Json 使用 C#序列号json,反序列化对象
- 常见面试算法问题
- jquery那点事之写轮播图
- Spring依赖注入的XML配置文件的实现思想(1)——准备工作:如何读取XML的文件的内容
- 使用SQLite方式存储数据
- ODBC连接数据库的方法
- Android存储和加载本地文件(内部存储设备)
- Linux网络编程之TCP(下)- I/O数据复用
- php如何实现定时任务,php定时任务方法,最佳解决方案,php自动任务处理
- 1011. World Cup Betting (20)——PAT (Advanced Level) Practise
- Android 之 Window、WindowManager 与窗口管理