Ionic Overflow:auto Failure

Source: Internet
Author: User

The thing is that colleagues upload a wide table file because the screen width of the phone is limited, so the user can scroll the page horizontally so that the contents of the table can be scrolled.

It felt very simple to add a overflow:auto to the container outside the table;

However, there is no problem with Android, but iOS doesn't work, and it doesn't roll.

So think with ionic in the rolling to achieve, ion-scroll;

<ion-scroll zooming= "true" direction= "X" >
<pre class= "Doc" ng-bind-html= "Displaydochtmldata" ></pre>
</ion-scroll>

This time you can scroll horizontally on both Android and Apple ...

However, because it is read from the background data, so, some content is very long, this time Android is still no problem, iOS is dead and alive up and down can't scroll ...

So on-line Baidu search, found a new method, do not know the principle,, the problem is solved anyway, incredible ...

1 <Ion-viewHide-back-button= "true"Cache-view= "false"Hide-nav-bar= "true">2 <Ion-header-barCache-view= "false"class= "Bar-positive Header-bar">3   <Buttonclass= "button Button-clear return-btn"Ng-click= "GoBack ()">4   </Button>5   <H1class= "title Title-center">Document view</H1>  6 </Ion-header-bar>7 <ion-contentNg-init= "init ()"class= "Bg-color"Overflow-scroll= "true">8   <Ion-scrollzooming= "true"direction= "XY"style= "height:100%;">9     <Preclass= "Doc"ng-bind-html= "Displaydochtmldata"></Pre>Ten   </Ion-scroll> One </ion-content> A </Ion-view>

Add Overflow-scroll= "true" to ion-content

Ion-scroll added direction= "XY" style= "height:100%;"

Have time to study again.

Ionic Overflow:auto Failure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.