Usage Analysis of jQuery Focus Graph Rollover Plugin KinSlideshow

  • 2021-06-28 08:23:04
  • OfStack

This article provides an example of the jQuery Focus Graph Roadcasting plug-in KinSlideshow usage.Share it for your reference, as follows:


<!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>JQuery的KinSlideshow插件打造超炫焦点图,带参数说明</title>
  <script language="javascript" type="text/javascript" src="/Scripts/jquery-1.4.4.min.js"></script>
  <script src="/Scripts/jquery.KinSlideshow-1.2.1.min.js" type="text/javascript"></script>
  <script type="text/javascript">
    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    //切换1张图片所需时间,【单位:毫秒】[默认为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]。
    *
    **/
  </script>
  <style type="text/css">
    #KinSlideshow{ overflow: hidden;width: 600px;height: 300px; }
  </style>
</head>
<body>
  <h2>
    打开页面随机选择切换方式(方向)---刷新页面</h2>
  <div id="KinSlideshow1" style="visibility: hidden;">
    <a href="" target="_blank"><img src="/images/1.jpg" alt="这是标题1" width="600" height="300" /></a>
    <a href="" target="_blank"><img src="/images/2.jpg" alt="这是标题2" width="600" height="300" /></a>
    <a href="" target="_blank"><img src="/images/3.jpg" alt="这是标题3" width="600" height="300" /></a>
  </div>
</body>
</html>

More readers interested in jQuery-related content can view this site's topics: Ajax Usage Summary in jquery, jQuery Table (table) Operation Skills Summary, jQuery Dragging Special Effects and Skills Summary, jQuery Extended Skills Summary, jQuery General Classic Special Effects Summary, jQuery Animation and Usage Summary, etc.jquery Selector Usage Summary and jQuery Common Plugins and Usage Summary

I hope that the description in this paper will be helpful to everyone's jQuery program design.


Related articles: