1
我希望.wrapper
在元素的底部有76px的padding
。爲什麼在Microsoft Edge中沒有.wrapper
的padding-bottom
屬性?Microsoft Edge中的填充和溢出滾動
是否有解決此問題的最後一個孩子不涉及margin
?
.wrapper {
height: 400px;
width: 100%;
background-color: red;
overflow-y: scroll;
padding-bottom: 76px;
box-sizing: border-box;
}
<div class="wrapper">
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
<div class="wrapper__thing">Test</div>
</div>
相關:http://stackoverflow.com/questions/20624938/padding-bottom-is-ignored-in-firefox-and-ie-on-overflowing-elements-with-無續 – misterManSam