基本上我有一个边缘底部的所有'行'divs。在最后一个div上有一个margin-bottom:0,但它似乎没有工作。我正在使用HTML和SCSS。Last-Child Margin-Bottom not working
body {
margin: 0;
padding: 0;
font-family: sans-serif; }
.left-sidebar {
width: 100px;
position: fixed;
top: 0;
left: 0;
height: 100%;
background-color: red; }
.main-body {
margin-left: 100px;
background-color: blue;
padding: 50px; }
.main-body a {
margin-bottom: 50px; }
.main-body a .row {
max-width: 100%;
height: 700px;
margin-bottom: 50px; }
.main-body a .row.one {
border: 10px solid red; }
.main-body a .row.two {
border: 10px solid red; }
.main-body a .row.three {
border: 10px solid red; }
<div class="left-sidebar">
</div>
<div class="main-body">
<a href="#"><div class="row one"></div></a>
<a href="#"><div class="row two"></div></a>
<a href="#"><div class="row three"></div></a>
</div>
我在代码中的任何地方都看不到'margin-bottom:0'。 “last div”是指“.main-body”还是“.row.three”?期望的行为是什么? – Oriol