可以說我使用shorhand背景屬性定義多個properties..eg:覆蓋速記背景屬性的一個屬性
.img
{
background: url('/Content/images/a.png') no-repeat scroll 100% 3px;
}
如果我現在要重寫只是圖像的背景,現在的位置,我應該使用完整的速記符號與像更新的位置:
.img
{
background: url('/Content/images/a.png') no-repeat scroll 0 3px;
}
或只是覆蓋類的背景位置屬性:
.img
{
background-position: 0 3px;
}
如果是這樣,有什麼問題?只有壓倒位置纔有輕微的表現收益?
沒有問題。覆蓋整個速記的問題是,你可能會複製和粘貼錯誤或改變一些簡寫,但忘記其他,而事情變得不一致。 – BoltClock