mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Scroll size limit
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
}
|
||||
#wrapper {
|
||||
position: relative;
|
||||
height: 400px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
<div id="wrapper" style="margin-top: 44px">
|
||||
<div id="scroller" class="scroll">
|
||||
<div id="filler" style="width: 4400px; height: 1000px; background: url('tree_bark.png') repeat;"></div>
|
||||
<div id="filler" style="width: 4400px; height: 6000px; background: url('tree_bark.png') repeat;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -38,21 +38,23 @@
|
||||
<script>
|
||||
var s = document.getElementById('scroller');
|
||||
|
||||
var w = s.scrollWidth;
|
||||
var w = s.scrollHeight;
|
||||
|
||||
for(var i = 0; i < w; i++) {
|
||||
if((i % 500) === 0) {
|
||||
var l = document.createElement('span');
|
||||
l.innerText = i + 'px'
|
||||
l.style.position = 'absolute';
|
||||
l.style.left = i + 'px';
|
||||
l.style.top = '20px';
|
||||
l.style.left = '20px';
|
||||
l.style.top = i + 'px';
|
||||
s.appendChild(l);
|
||||
}
|
||||
}
|
||||
|
||||
var scroll = new ionic.views.Scroll({
|
||||
var scroll = new ionic.views.ScrollView({
|
||||
el: s,
|
||||
isHorizontalEnabled: false,
|
||||
isVerticalEnabled: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user