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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM