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