zoukankan      html  css  js  c++  java
  • SuperSlide

    今天又接触到另一个新的前端插件,心情美美哒~

    SuperSlide 致力于解决网站大部分特效展示问题,使网站代码规范整洁,方便维护更新,官网地址:http://www.superslide2.com/index.html。话不多说,看使用方法+效果:

    1.SuperSlide是基于jQuery的插件,所以前提必须先引用jQuery,再引用SuperSlide:

    <head>
        <script type="text/javascript" src="../jquery1.42.min.js"></script>
        <script type="text/javascript" src="../jquery.SuperSlide.2.1.1.js"></script>
    </head>

    2.默认的HTMl结构,分别是 ".hd" 里面包含ul, ".bd" 里面包含ul:

    <div class="slideTxtBox">
        <div class="hd">
            <ul><li>教育</li><li>培训</li><li>出国</li></ul>
        </div>
        <div class="bd">
            <ul>
                <li><a href="http://www.SuperSlide2.com" target="_blank">SuperSlide2.0正式发布!</a></li>
                ...
            </ul>
            <ul>
                <li><a href="http://www.SuperSlide2.com" target="_blank">名师教作文:3妙招巧写高分</a></li>
                ...
            </ul>
            <ul>
                <li><a href="http://www.SuperSlide2.com" target="_blank">澳大利亚八大名校招生说明会</a></li>
                ...
            </ul>
        </div>
    </div>

    3.增加css样式,使得页面美观一点:

    .slideTxtBox{ width:450px; border:1px solid #ddd; text-align:left;  }
    .slideTxtBox .hd{ height:30px; line-height:30px; background:#f4f4f4; padding:0 20px; border-bottom:1px solid #ddd;  position:relative; }
    .slideTxtBox .hd ul{ float:left; position:absolute; left:20px; top:-1px; height:32px;   }
    .slideTxtBox .hd ul li{ float:left; padding:0 15px; cursor:pointer;  }
    .slideTxtBox .hd ul li.on{ height:30px;  background:#fff; border:1px solid #ddd; border-bottom:2px solid #fff; }
    .slideTxtBox .bd ul{ padding:15px;  zoom:1;  }
    .slideTxtBox .bd li{ height:24px; line-height:24px;   }
    .slideTxtBox .bd li .date{ float:right; color:#999;  }

    4.调用SuperSlide:

    <script type="text/javascript">
      jQuery(".slideTxtBox").slide();
    </script>

    5.效果:实现类似于标签页的切换效果:

    其他特效还包括:导航、焦点图、tab切换、图片滚动、文字滚动等

  • 相关阅读:
    poj1966 Cable TV Network
    contesthunter#17-c 舞动的夜晚
    joyoi1957 「Poetize5」Vani和Cl2捉迷藏
    joyoi1935 「Poetize3」导弹防御塔
    luogu3629 [APIO2010]巡逻
    poj2728 Desert King
    poj1734 Sightseeing trip
    loj2003 「SDOI2017」新生舞会
    hdu2255 奔小康赚大钱 KM 算法
    POJ 1681 Painter's Problem(高斯消元+枚举自由变元)
  • 原文地址:https://www.cnblogs.com/zhengyeye/p/6086466.html
Copyright © 2011-2022 走看看