2015-11-19 62 views
0

所以我試圖讓ng-scrollable與我的應用程序一起工作。我按照說明安裝在我的網站上,但我無法使其正常工作。ng-scrollable根本不工作

由於擔心有東西阻止它在我的網站的工作,我決定成立一個codepen,它仍然不工作:

http://codepen.io/r3plica/pen/JYzmax

我想實現一個水平滾動條滾動即當我使用我的鼠標滾輪時左右。 我添加的代碼(最初)是這樣的:

<div ng-scrollable="{ scrollX: 'bottom', scrollY: 'none' }" style="height: 100%; width: 10000px;"><section class="page" ui-view metro></section></div> 

但這並沒有工作。

有人可以幫我嗎?

+0

所有你正在做的是__display__在底部的滾動條。 –

回答

0

在您的示例中,如果將寬度和高度設置爲50px,則會出現滾動條。它看起來像滾動條僅在內容太寬而無法適應div的設置寬度/高度時出現。

試試這個代碼,而不是:

<div ng-app="Scroll"> 
    <div ng-scrollable="{ scrollX: 'bottom', scrollY: 'left' }" style="height: 500px; width: 500px; border:1px solid red;"> 
    <h1>This is a test</h1> 
    <div style="margin-top:10000px; margin-left:10000px;">test</div> 
    </div> 
</div>