基本的に私は3列の列を持っており、列には画像とテキストがあります。iPadのフレックス高さ
Android、Fire-Foxでは、各列の親の高さを取得し、他の列が大きい場合はテキストを中央に配置しました。しかし、iOS 8.3と9.3.5のiPadでは、縦幅を高さの100%にすることはできません。
codepenがある:https://codepen.io/rocketraccoon/pen/PEopPO
そして、ここで私はスニペットを残す:
body {
background-color: red !important; /* Only for trying to see the visual effect required */
}
.triple-opcion {
padding: 40px;
}
.triple-opcion .opciones .opcion {
background-color: #FFFFFF;
text-align: center;
padding: 40px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
height: 100%;
min-height: 100%;
}
.triple-opcion .opciones .opcion:hover,
.triple-opcion .opciones .opcion:focus,
.triple-opcion .opciones .opcion:active {
text-decoration: none;
}
.triple-opcion .opciones .opcion .t5 {
text-transform: uppercase;
color: #191D22;
margin: auto;
max-width: 100%;
}
.triple-opcion .opciones .opcion img {
width: 64px;
margin-bottom: 15px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="triple-opcion ayuda">
<div class="row opciones opciones-ayuda">
<div class="col-4">
<a href="#>
<div class="opcion">
<img src="http://via.placeholder.com/300" alt="">
<p class="t5">Lorem Ipsum es simplemente el texto de relleno de las imprentas y archivos de texto. Lorem Ipsum ha sido el texto de relleno estándar de las industrias desde el año 1500</p>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="opcion">
<img src="http://via.placeholder.com/300" alt="">
<p class="t5">24 months</p>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="opcion">
<img src="http://via.placeholder.com/300" alt="">
<p class="t5">48 months</p>
</div>
</a>
</div>
</div>
</div>
あなたが提供できるすべてのヘルプは参考になります。
私が知っている、使用分の高さがある場合にはIEがALIGN-項目に問題があること:https://caniuse.com /#search = align-itemsもおそらくここにありますか? – MrBuggy
@MrBuggy Safariは 'min-height'をサポートしていないようですが、それが私に' height'属性も含めた理由です。 Safari以外のデバイスは正常に動作しています(IEはまだテストしていません)。 – Cheshire
最小高さを削除するとどうなりますか? – MrBuggy