background: none
等價於:
background-color: initial;
background-image: none;
background-repeat: initial;
background-attachment: initial;
background-position: initial;
background: transparent
等價於:
background-color: transparent;
background-image: initial;
background-repeat: initial;
background-attachment: initial;
background-position: initial;
區別
可以認爲 background: none和background: transparent沒有區別。
但background: none和background: red是有區別的,background: none會把所有屬性置爲初始值,background: red只會把background-color變爲red,保留其他屬性值。
參考
《background:none vs. background:transparent what is the difference?》