Is there a difference between these two CSS properties:
background: none;
background: transparent;
- Are they both valid?
- Which one should be used and why?
ベストアンサー1
There is no difference between them.
の短縮形である6 つのプロパティのいずれにも値を指定しない場合はbackground
、デフォルト値に設定されます。none
および がtransparent
デフォルトです。
background-image
1 つはを に明示的に設定しnone
、background-color
をに暗黙的に設定しますtransparent
。もう 1 つはその逆です。