jquery 插件页面回到顶部

引用:

jquery.scrollUp.min.js

js:

 $.scrollUp({

        scrollName: 'scrollUp', // Element ID

        topDistance: '300', // Distance from top before showing element (px)

        topSpeed: 300, // Speed back to top (ms)

        animation: 'fade', // Fade, slide, none

        animationInSpeed: 200, // Animation in speed (ms)

        animationOutSpeed: 200, // Animation out speed (ms)

        scrollText: '', // Text for element

        activeOverlay: false  // Set CSS color to display scrollUp active point, e.g '#00FFFF'

    });

html:

  <a id="scrollUp" href="#top" title="" style="position: fixed; z-index: 2147483647;

        display: block;"></a>

css:

#scrollUp

{

    bottom: 20px;

    right: 20px;

    height: 38px;

    width: 38px;

    background: url("../../../images/top.png") no-repeat;

}

至于图片,你们自己加吧!

你可能感兴趣的:(jquery)