下の画像のように、flex property
(「画像コンテンツ」テキストセンターをブロックに合わせて左揃えにしてください)テキストをどのようにしてブロックで中心合わせしますが、左に揃えますか?
しかし、私は、私は(ブロックと"画像コンテンツ"テキスト整列センターが、画像のように左に揃える)必要がある。この
.wrapper {
max-width:300px;
}
.main {
width:300px;
display:flex;
justify-content:center;
align-items:center;
flex-flow:column nowrap;
background:#458bc3;
color:#fff;
height:300px;
overflow:hidden;
}
.content {
color:#fff;
background:#a6d8ff;
height:100px;
display:flex;
justify-content:center;
align-items:center;
flex-flow:column nowrap;
}
.content p {
margin:0px;
}
<div class="wrapper">
<div class="main">
IMAGE
</div>
<div class="content">
<p>
Image
</p>
<p>
Content
</p>
</div>
</div>
を得ました。 誰もがフレックスでこのアプローチを得る方法を教えてくれますか?
うわー...それは私が期待しているように働いています、ありがとうたくさん...... – LKG
あなたの歓迎:) –