nanoScroller无法正常工作

时间:2013-08-26 15:26:57

标签: javascript jquery scroll

我正在尝试在我的项目中使用nanoScroller。我将通过official site的文档。这是我提出的代码(nano.js包含与该页面中提到的production site相同的代码。但是,它不起作用,文本只是溢出容器。可以有谁告诉我,我做错了什么?这是我的代码:

<!DOCTYPE html>
<html>
    <head>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
        </script>
        <script src="nano.js">
        </script>
        <link rel="stylesheet" href="https://raw.github.com/jamesflorentino/nanoScrollerJS/master/bin/css/nanoscroller.css">
        <style>
             .nano { width: 500px; height: 200px;}
             .nano .content { padding: 10px;  }
             .nano .pane   { background: black; }
             .nano .slider { background: #111; }
        </style>
        <script>
                $(document).ready(function(){
                     $(".nano").nanoScroller();
                });
        </script>
    </head>
    <body>
      <div id="about" class="nano">
        <div class="content"> 
            Thanks to SublimeVideo Horizon, the SublimeVideo Modular Player can now easily be enriched with future features and add-ons. Below, we would like to share with you some possible upcoming features and add-ons. We would be delighted if you let us know about any other add-on you may need.Thanks to SublimeVideo Horizon, the SublimeVideo Modular Player can now easily be enriched with future features and add-ons. Below, we would like to share with you some possible upcoming features and add-ons. We would be delighted if you let us know about any other add-on you may need.Thanks to SublimeVideo Horizon, the SublimeVideo Modular Player can now easily be enriched with future features and add-ons. Below, we would like to share with you some possible upcoming features and add-ons. We would be delighted if you let us know about any other add-on you may need.Thanks to SublimeVideo Horizon, the SublimeVideo Modular Player can now easily be enriched with future features and add-ons. Below, we would like to share with you some possible upcoming features and add-ons. We would be delighted if you let us know about any other add-on you may need.Thanks to SublimeVideo Horizon, t
        </div> 
      </div>
    </body>
</html>

1 个答案:

答案 0 :(得分:1)

row.github.com不是CDN,因此不允许从其他网站进行远程访问。将CSS文件下载到您的服务器并更改<link rel="stylesheet" />所以。