ionic content not scrolling

前端 未结 3 1481
刺人心
刺人心 2021-01-05 16:11

I have gone through many answers, but nothing worked for me. I have a simple .html file and ionic content just does not scroll.




        
相关标签:
3条回答
  • 2021-01-05 16:35

    Sandy to hide the scrollbar try to add ::-webkit-scrollbar {display:none;} to your css file. It worked for me.

    0 讨论(0)
  • 2021-01-05 16:38

    In ionic v1.3.3 or later, scroll on is not working. this can be solved by placing overflow-scroll="false" in or defining as

        <ion-content overflow-scroll="false">
    

    OR

        <ion-scroll scrollX="true" scrollY="true" style="margin:17rem; position:fixed; display:inline; top:0; right:0; bottom:0; left:0; white-space: nowrap;"> 
    

    will help.

    0 讨论(0)
  • 2021-01-05 16:54

    Remove the class="scroll" from the div container, scroll="true" from ion-content and add overflow-scroll="true" . The required classes will be added by ionic on the elements. You don't need to add that explicitly

    <ion-view>
       <ion-content overflow-scroll="true">
            <div class="list">
                <a ng-repeat="item in items" class="item" href="#">
                    <h2>{{item.name}}</h2>
                </a>
            </div>
        </ion-content>
    </ion-view>
    

    Update: The codepen showing the scrollable list in chrome simulator: http://codepen.io/addi90/full/RaOegM/

    0 讨论(0)
提交回复
热议问题