不適用我做的網格,HTML:CSS規則,但在瀏覽器
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box sizing: border-box;
}
.mygrid {
margin: 0 0 20px 0;
}
&:after {
content: "";
display: table;
clear: both;
}
[class*='col-'] {
float: left;
padding-right: 20px;
}
.grid &:last-of-type {
padding-right: 0;
}
.col-1-2 {
width: 33.3%;
}
.col-2-3 {
width: 66.6%;
}
.content {
background-color: #8AB9FF;
padding: 20px;
}
<div class="mygrid">
<div class="col-1-2">
<div class="content">
<p>Text text text</p>
</div>
</div>
<div class="col-2-3">
<div class="content">
<p>Text text text</p>
</div>
</div>
</div>
所有變更申請文件上除了在.content
最後一條規則。當我在瀏覽器(chrome,mozilla,即)中啓動文檔並檢查元素時,我看不到顏色規則,但可以看到創建的其他規則。
它似乎是工作(至少在stacksnippet)。 – 2014-12-06 15:50:45