KinSlideshow图片轮显

本文介绍了如何利用KinSlideshow库创建一个动态图片轮显效果,包括设置参数、添加图片、实现过渡动画等关键步骤,帮助开发者实现简洁高效的图片展示功能。
摘要由CSDN通过智能技术生成
     <div id="KinSlideshow" style="visibility: hidden;">
                <a href="/"><img src="img/1.jpg" alt="" width="690" height="250" /></a> 
                <a href="/"><img src="img/2.jpg" alt="" width="690" height="250" /></a> 
                <a href="/"><img src="img/3.jpg" alt="" width="690" height="250" /></a> 
                <a href="/"><img src="img/4.jpg" alt="" width="690" height="250" /></a>
        </div>


<script src="scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
<
jQuery插件,kinslideshow,制作焦点图、广告、图片切换很方便,没发现不兼容的,使用起来方便,下面是一些参数配置 [removed] var moveStyle var rand = parseInt(Math.random() * 4) switch (rand) { case 0: moveStyle = "left"; break; case 1: moveStyle = "right"; break; case 2: moveStyle = "down"; break; case 3: moveStyle = "up"; break; } $(function () { $("#KinSlideshow1").KinSlideshow({ moveStyle: moveStyle }); }) /** * jQuery KinSlideshow plugin intervalTime:5, //设置间隔时间为5秒 【单位:秒】 [默认为5秒] moveSpeedTime:400 //切换一张图片所需时间,【单位:毫秒】[默认为400毫秒] moveStyle:"left", //切换方向 可选值:【 left | right | up | down 】left:向左切换,right:向右切换,up:向上切换,down:向下切换 [默认向左切换] mouseEvent:"mouseclick", //鼠标操作按钮事件,可选值:【mouseclick | mouseover】mouseclick:鼠标单击切换。mouseover:鼠标滑过切换。[默认为鼠标点击按钮切换] isHasTitleBar:true, //是否显示标题背景 可选值:【 true | false 】[默认为true] titleBar:{titleBar_height:40,titleBar_bgColor:"#000000",titleBar_alpha:0.5},//标题背景样式,(isHasTitleBar = true 前提下启用) titleBar_height :40 - > 标题背景高度。[默认:40] titleBar_bgColor:"#000000" - > 标题背景颜色。[默认:#000000] titleBar_alpha:0.5 -> 标题背景透明度,取值【0~1】。[默认:0.5] isHasTitleFont:true, //是否显示标题文字 可选值:【 true | false 】[默认为true] titleFont:{TitleFont_size:12,TitleFont_color:"#FFFFFF",TitleFont_family:"Verdana",TitleFont_weight:"bold"}, //标题文字样式,(isHasTitleFont = true 前提下启用) TitleFont_size - > 标题文字大小 单位像素。[默认:12] TitleFont_color:"#FFFFFF" - > 标题文字颜色。[默认:#000000] TitleFont_family:"Verdana" -> 标题文字字体。[默认:Verdana] TitleFont_weight:"bold" -> 标题文字粗细。可选值:【 bold | normal 】[默认:"bold"] ,normal 正常 不加粗。 isHasBtn:true, //是否显示按钮 btn:{btn_bgColor:"#666666",btn_bgHoverColor:"#CC0000", btn_fontColor:"#CCCCCC",btn_fontHoverColor:"#000000",btn_fontFamily:"Verdana", btn_borderColor:"#999999",btn_borderHoverColor:"#FF0000", btn_borderWidth:1,btn_bgAlpha:0.7} //按钮样式设置,(isHasBtn = true 前提下启用) btn_bgColor:"#666666" -> 按钮背景颜色 [默认:"#666666"]。 btn_bgHoverColor:"#CC0000" -> 按钮滑过/点击 背景颜色 [默认:"#CC0000"]。 btn_fontColor:"#CCCCCC" -> 按钮文字颜色 [默认:"#CCCCCC"]。 btn_fontHoverColor:"#000000" -> 按钮滑过/点击 按钮文字颜色 [默认:"#000000"]。 btn_fontFamily:"Verdana", -> 按钮文字字体 [默认:"Verdana"]。 btn_borderColor:"#999999" -> 按钮边框颜色 [默认:"#999999"]。 btn_borderHoverColor:"#FF0000" -> 按钮滑过/点击 按钮边框颜色 [默认:"#FF0000"]。 btn_borderWidth:1 -> 按钮边框宽度,单位像素 不能超过3 [默认:1]。 btn_bgAlpha:0.7 -> 按钮透明度 ,取值【0~1】 [默认:0.7]。 * **/ [removed]
很好的 图片轮播 jquery轮播 <div style="visibility: visible; width: 600px; height: 300px; overflow: hidden; position: relative;" id="KinSlideshow1"> <div id="KinSlideshow_moveBox" style="width: 600px; height: 300px; overflow: hidden; position: relative;"><div id="KinSlideshow_content"><a target="_blank" href="http://www.qq1.com"><img width="600" height="300" alt="这是标题一" src="images/1.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq2.com"><img width="600" height="300" alt="这是标题二" src="images/2.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq3.com"><img width="600" height="300" alt="这是标题三" src="images/3.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq4.com"><img width="600" height="300" alt="这是标题四" src="images/4.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq5.com"><img width="600" height="300" alt="这是标题五" src="images/5.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq6.com"><img width="600" height="300" alt="这是标题六" src="images/6.jpg" style="border: 0px none;"></a></div><div id="KinSlideshow_contentClone"><a target="_blank" href="http://www.qq1.com"><img width="600" height="300" alt="这是标题一" src="images/1.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq2.com"><img width="600" height="300" alt="这是标题二" src="images/2.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq3.com"><img width="600" height="300" alt="这是标题三" src="images/3.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq4.com"><img width="600" height="300" alt="这是标题四" src="images/4.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq5.com"><img width="600" height="300" alt="这是标题五" src="images/5.jpg" style="border: 0px none;"></a><a target="_blank" href="http://www.qq6.com"><img width="600" height="300" alt="这是标题六" src="images/6.jpg" style="border: 0px none;"></a></div></div> <div class="KinSlideshow_titleBar" style="height: 40px; width: 100%; position: absolute; bottom: 0px; left: 0px; background: none repeat scroll 0% 0% rgb(0, 0, 0); opacity: 0.5;"><h2 style="margin: 3px 0px 0px 6px; padding: 0px; font-size: 12px; color: rgb(255, 255, 255); font-family: Verdana; font-weight: bold;" class="title">这是标题三</h2></div><div style="position:absolute;right:10px;bottom:5px; z-index:100" class="KinSlideshow_btnBox"><ul style="margin:0;padding:0; overflow:hidden" id="btnlistID"><li style="list-style: none outside none; float: left; width: 18px; height: 18px; border-width: 1px; border-color: rgb(153, 153, 153); border-style: solid; background: none repeat scroll 0% 0% rgb(102, 102, 102); text-align: center; cursor: pointer; margin-left: 3px; font-size: 12px; font-family: Verdana; line-height: 18px; opacity: 0.7; color: rgb(204, 204, 204);">1</li><li style="list-style: none outside none; float: left; width: 18px; height: 18px; border-width: 1px; border-color: rgb(153, 153, 153); border-style: solid; background: none repeat scroll 0% 0% rgb(102, 102, 102); text-align: center; cursor: pointer; margin-left: 3px; font-size: 12px; font-family: Verdana; line-height: 18px; opacity: 0.7; color: rgb(204, 204, 204);">2</li><li style="list-style: none outside none; float: left; width: 18px; height: 18px; border-width: 1px; border-color: rgb(255, 0, 0); border-style: solid; background: none repeat scroll 0% 0% rgb(204, 0, 0); text-align: center; cursor: pointer; margin-left: 3px; font-size: 12px; font-family: Verdana; line-height: 18px; opacity: 0.7; color: rgb(0, 0, 0);">3</li><li style="list-style: none outside none; float: left; width: 18px; height: 18px; border-width: 1px; border-color: rgb(153, 153, 153); border-style: solid; background: none repeat scroll 0% 0% rgb(102, 102, 102); text-align: center; cursor: pointer; margin-left: 3px; font-size: 12px; font-family: Verdana; line-height: 18px; opacity: 0.7; color: rgb(204, 204, 204);">4</li><li style="list-style: none outside none; float: left; width: 18px; height: 18px; border-width: 1px; border-color: rgb(153, 153, 153); border-style: solid; background: none repeat scroll 0% 0% rgb(102, 102, 102); text-align: center; cursor: pointer; margin-left: 3px; font-size: 12px; font-family: Verdana; line-height: 18px; opacity: 0.7; color: rgb(204, 204, 204);">5</li><li style="list-style: none outside none; float: left; width: 18px; height: 18px; border-width: 1px; border-color: rgb(153, 153, 153); border-style: solid; background: none repeat scroll 0% 0% rgb(102, 102, 102); text-align: center; cursor: pointer; margin-left: 3px; font-size: 12px; font-family: Verdana; line-height: 18px; opacity: 0.7; color: rgb(204, 204, 204);">6</li></ul></div></div>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值