本文实例讲述了jquery实现的轮播图功能。分享给大家供大家参考,具体如下:
前面介绍了原生js实现的轮播图,今天就试着用jquery做了个轮播图,方法都一样,但jquery实现却比js方便了许多
www.jb51.net jQuery轮播图 *{ margin: 0px; padding: 0px; list-style: none; } #flash{ width: 400px; height: 200px; position: relative; margin: 0 auto; border:1px solid black; overflow: hidden; } #falsh img{ width: 100%; height: 100%; position: absolute; left: 0; top: 0; } #flash ul{ position: absolute; left: 25%; bottom: 5%; width: 200px; height: 30px; border-radius: 20px; background-color: rgba(0,0,0,0.5); } #flash ul li{ float: left; width: 15px; height: 15px; border-radius: 50%; background-color: #fff; margin-left: 20px; margin-top: 7px; } #flash ul .li_first{ background-color: #f40; } #flash .button{ width: 50px; height: 50px; border-radius: 50%; background-color: rgba(0,0,0,0.3); cursor: pointer; } #flash .right{ position: absolute; right: 10px; top: 80px; } #flash .left{ position: absolute; left: 10px; top: 80px; } #flash .button span{ font-size: xx-large; font-weight: 700; line-height: 50px; margin-left: 15px; color: rgba(255,255,255,0.5); } > <
感兴趣的朋友可以使用在线HTML/CSS/Javascript代码运行工具:http://tools.jb51.net/code/HtmlJsRun,测试一下运行效果。
更多关于jQuery相关内容感兴趣的读者可查看本站专题:《jQuery图片操作技巧大全》、《jQuery表格(table)操作技巧汇总》、《jQuery切换特效与技巧总结》、《jQuery扩展技巧总结》、《jQuery常用插件及用法总结》、《jQuery常见经典特效汇总》及《jquery选择器用法总结》
希望本文所述对大家jQuery程序设计有所帮助。



