【发布时间】:2015-08-15 03:45:23
【问题描述】:
我有一个在移动设备上使用的应用。我有一个简单的水平滚动和一些文本。如果用户在水平滚动条之外向上或向下滑动,则页面会上下滑动。但是,当用户在水平滚动条内用手指向上或向下滑动时,页面不会向上或向下滑动。我想让它向上或向下滑动。下面是codepen。
这里是代码。
<ion-scroll direction="x" class="wide-as-needed">
<a class="button inline-button">this is a button : 1</a>
<a class="button">this is a button : 2</a>
<a class="button">this is a button : 3</a>
<a class="button">this is a button : 4</a>
<a class="button">this is a button : 5</a>
<a class="button">this is a button : 6</a>
<a class="button">this is a button : 7</a>
<a class="button">this is a button : 8</a>
<a class="button">this is a button : 9</a>
<a class="button">this is a button : 10</a>
<a class="button">this is a button : 11</a>
<a class="button">this is a button : 12</a>
<a class="button">this is a button : 13</a>
<a class="button">this is a button : 14</a>
<a class="button">this is a button : 15</a>
<a class="button">this is a button : 16</a>
</ion-scroll>
<ion-toggle ng-model="data.isLoading">Toggle me to toggle loading!</ion-toggle>
<ion-toggle ng-model="data.isLoading">Toggle me to toggle loading!</ion-toggle>
<ion-toggle ng-model="data.isLoading">Toggle me to toggle loading!</ion-toggle>
<ion-toggle ng-model="data.isLoading">Toggle me to toggle loading!</ion-toggle>
<ion-toggle ng-model="data.isLoading">Toggle me to toggle loading!</ion-toggle>
CSS
.wide-as-needed {
overflow: scroll;
white-space: nowrap;
}
.scroll {
min-width: 100%;
}
【问题讨论】:
-
那个问题与我的问题无关。他们提供的答案是我用于解决问题的实际代码。
标签: html css ionic-framework horizontal-scrolling