I usually put 0
as value when i want to remove something in css. For example:
border: 0;
background: 0;
Is there any difference between 0
and none
?
When used with composite styles like border
and background
, the values will correspond to different properties.
border: 0
will set border-width: 0
while border: none
will set border-style: none
.
background: 0
will set background-position: 0
while background: none
will set background-image: none
.
So, there is a difference. In the case of the border, the difference doesn't make any visual difference as both remove the border, but for the background it can make a difference if you also set any other background properties.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With