也許它是一個重複的問題。他人不與我的要求
匹配我有3個孩子的div(謝勝利-DIV-內單(類名))。
我必須設置此3個DIV相同父 DIV(謝勝利-DIV-內),或僅僅3分度相同的高度爲每一個最大如何設置子DIV高度相同父
.secound-div {
padding: 2rem 1rem;
margin-bottom: 1rem;
background-color: #333;
border-radius: 0.3rem;
margin-top: 1rem;
display: inline-block;
width: 100%;
}
.secound-div-letter-color {
color: #fff;
}
.secound-div-heading {
color: #e9e03b;
text-align: center;
font-family: 'Times New Roman';
}
.labels {
color: #e9e03b;
text-align: center;
font-family: 'Times New Roman';
}
.secound-div-heading2 {
color: #b4b00b;
text-align: center;
font-family: 'Times New Roman';
}
.secound-div-inner {
text-align: center;
background-color: #333;
font-size: medium;
font-weight: 500;
font-family: 'Times New Roman';
color: #e9e03b;
height: 100%;
}
.secound-div-inner-single {
background-color: #fff;
color: #b4b00b;
padding: 25px;
margin-bottom: 1rem;
}
<div class="container-fluid">
<div class="row">
<div id="#About" class="col-md-12">
<div class="secound-div">
<hr class="line" />
<div class="secound-div-heading">
<h1>Heading</h1>
</div>
<hr class="line" />
<div id="parent" class="secound-div-inner">
<div class="col-md-4">
<div id="child" class="secound-div-inner-single">
<div class="secound-div-heading2 ">
<h1>Heading 1</h1>
<hr class="line" />
</div>
<p>
Div1
</p>
</div>
</div>
<div class="col-md-4">
<div class="secound-div-inner-single">
<div class="secound-div-heading2">
<h1>Heading 2</h1>
<hr class="line" />
</div>
<p>
Div2
</p>
</div>
</div>
<div class="col-md-4">
<div class="secound-div-inner-single">
<div class="secound-div-heading2">
<h1>Heading 3</h1>
<hr class="line" />
</div>
<p>
Div3
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
當屏幕尺寸改變
使用**高度:繼承; **對於兒童 – LSKhan
@LSKhan沒有使用沒有變化 – Jks
僞解決方案是爲3塊指定'min-height'以確保它們保持不變,並且您可以調整根據需要的價值 –