background:none vs background:transparent what is the difference?

后端 未结 3 1874
情歌与酒
情歌与酒 2020-12-07 11:43

Is there a difference between these two CSS properties:

background: none;
background: transparent;
  1. Are they both val
3条回答
  •  鱼传尺愫
    2020-12-07 11:53

    To complement the other answers: if you want to reset all background properties to their initial value (which includes background-color: transparent and background-image: none) without explicitly specifying any value such as transparent or none, you can do so by writing:

    background: initial;
    

提交回复
热议问题