ionic开发-如何在ion-content形成上下结构 上面固定下层可滚动

 1 <ion-content scroll="false">
 2     <div class="t-result">
 3         当前选择:A/B
 4     </div>
 5     <ion-scroll direction="y" class="pList-scroll">
 6         <dl id="#{{list.fChar}}" class="provinceList" ng-repeat="items in pListArr">
 7             <dt>{{items.fChar}}</dt>
 8             <div ng-repeat="item in items.data">
 9                 <dd ng-click="showCList(item)">
10                     {{item}}
11                 </dd>
12             </div>
13         </dl>
14     </ion-scroll>
15     
16 </ion-content>
 1 .t-result{
 2   height:40px;
 3 }
 4 
 5 .pList-scroll{
 6   position: absolute;
 7       top: 40px!important;
 8       bottom: 0;
 9       left: 0;
10       right: 0;
11 }

you can deactivate scrolling of the ion-content.
Set scroll="false"

And add your fixed content on top of the ion-content and for the scrollable content use an ion-scroll in the ion-content.

Greets, bengtler

这样一来就可以保证t-result中的元素固定在页面上方  pList-scroll元素可以滚动,且不会遮挡上方元素。

posted @ 2015-09-10 11:53  未来造梦师  阅读(9433)  评论(1编辑  收藏  举报