私はdiv
にdisplay: flex
、2人の子供には.left
と.right
と言うことがあります。 .left
と.right
のコンテンツサイズが異なります。私はここで、ここで子供フレックスボックス内で子供の身長を同じにします
に同じ高さを設定は、最小限の作業コードである
.container{
\t display: flex;
\t align-items: center
}
.left, .right{
\t width: 50%;
}
.right{
\t background: blue;
\t height: 100%;
}
.left{
\t background: green;
\t height: 100%;
}
<div class="container">
\t <div class="left">
\t \t <span>this dis also should have same width as right div</span>
\t </div>
\t <div class="right">
\t \t orem 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.
\t </div>
</div>
する質問
注ためFiddleです:申請なしで解決策を選ぶg position: absolute
私の実際のウェブサイトを破壊するであろう。
http://stackoverflow.com/a/33815389/3597276 –