7

Ich versuchte Bootstrap Modal Box Arbeit und machen sie anspricht, und lesen Sie diese Frage zu machen: Bootstrap Modal Dialog. Can the grid system be used within a modal context?Wie kann man den Bootstrap Modal-Dialog auf einem echten iPhone reagieren lassen, wenn er bereits auf einem emulierten iPhone in Google Chrome funktioniert?

jedoch die Seite funktionierte gut in Google Chrome und arbeitete gut in Google Chrome simuliert iPhone 5, 6, oder 6 Plus (Hinweis: wie im Entwicklertool simuliert) - funktioniert aber nicht auf einem echten iPhone 6 Plus oder iPad (im Hochformat). (Der Text erscheint wirklich riesig).

Gibt es eine Möglichkeit, damit es funktioniert?

Der Code:

<div class="modal-body"> 
    <div class="container col-md-12"> 
     <div class="row"> 
      <p class="col-md-4"> 
       1 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. 
      </p> 
      <p class="col-md-4"> 
       2 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. 
      </p> 
      <p class="col-md-4"> 
       3 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. 
      </p> 
     </div> 
    </div> 
</div> 

Beispielseite auf: http://skiesof.blue/try/

P. S. Ich untersuche dieses Thema weiter. Mit meinem iPhone 6 Plus, das 9.3.1 iOS hat, so scheint es gut zu funktionieren, aber auf einem iPad mit iOS 9.0 oder 9.1, hat es dies, wenn die modale knallte besteht:

enter image description here

+0

Nach meiner Erfahrung ist Google Chrome sehr tolerant gegenüber Code, der normalerweise nicht in einem anderen Browser (Safari, IE usw.) funktionieren würde. Haben Sie in einem anderen Browser auf Ihrem MacBook getestet/debuggt? Ich muss debuggen mit IE, die wählerischer ist. – Lyall

+0

interessant zu wissen, mit IE zu verwenden, so dass es weniger tolerant ist. Ist es IE 11 oder Edge? Haben sie einen Emulationsmodus oder skalieren Sie das Fenster einfach so, dass es nicht breit ist? –

+0

Ich benutze IE 11, aber ändern Sie die Emulation, um IE9 (nicht früher) zu testen. Es gibt eine Emulation für das iPad, aber nicht speziell für das iPhone - ich verändere normalerweise nur die Größe des Bildschirms oder verwende einen spezifischen iPhone Emulator wie mobiletest.me oder so. Es gibt viele Möglichkeiten. Hoffe, du bekommst es funktioniert :) – Lyall

Antwort

2

Scheint, wie dies ist ein iOS9-Problem und hat nichts mit dem Inhalt des Modals zu tun. Ich habe kein iPhone 6+, aber ich habe das gleiche Problem auf meinem iPad erlebt. die folgende CSS Hinzufügen machte es für mich arbeiten:

body { 
    padding-right: 0px !important 
} 

.modal-open { 
    overflow-y: auto; 
} 

https://stackoverflow.com/a/32720590/1581477

https://github.com/jschr/bootstrap-modal/issues/64#issuecomment-55794181

+0

Lösung tatsächlich benötigen diese Antwort und können durch die andere Antwort von @Ismail verbessert werden. Es gibt einige Beobachtungen: (1) wenn das iOS 9.3 ist.1, dann funktionieren die 3 Seiten mehr oder weniger so, wie sie sind ... das Problem ist, wenn es iOS 9.0 oder 9.1 (ich bin mir nicht sicher über 9.2 und 9.3), und (2) das Hinzufügen von '.modal-open' allein wird behebt das Problem, es schien (keine Notwendigkeit, den 'body' Stil zu verwenden), und stelle sicher, dass es nach dem Verbinden mit der' bootstrap.css' [cont'd ...] –

+0

und (3) mit dem '.modal ist -open', dann werden die 'try-simple.html' und' try-container.html' in x-Richtung überlaufen, und das Entfernen von '

' (and the closing '
') wie in @Ismails Antwort wird es nicht überlaufen lassen –

2

Nach bootstrap example es keine Notwendigkeit container col-md-12 nach modal-body nur Ihre html nach modal-body hinzufügen hinzuzufügen ist.

<div class="modal-body"> 
    <div class="row"> 
    <div class="col-md-3"> 
     <p>1st col 3</p> 
    </div> 
    <div class="col-md-3"> 
     <p>2nd col 3</p> 
    </div> 
    <div class="col-md-3"> 
     <p>3rd col 3</p> 
    </div> 
    <div class="col-md-3"> 
     <p>4th col 3</p> 
    </div> 
    </div> 
</div>