试图覆盖行类的默认左右边距,它们是
.row .row {
margin-right: -15px;
margin-left: -15px;
}
页面有多个rows
类似
HTML
<div class="row row-padded" id="question1"></div>
<div class="row row-padded" id="question2"></div>
<div class="row row-padded" id="question3"></div>
CSS
.row-padded {
margin-top:15px;
padding-left:25px;
padding-top:10px;
padding-bottom:10px;
}
如果我用id
. 这适用于一排
#question1 {
margin-left:0px;
margin-right:0px;
}
但这并不
div[id^='question'] {
margin-left:0px;
margin-right:0px;
}