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元素可以滚动,且不会遮挡上方元素。

转载于:https://www.cnblogs.com/map90/p/4797400.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值