CSS差异在0和0em之间 [英] CSS difference between 0 and 0em

查看:128
本文介绍了CSS差异在0和0em之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

margin: 0;

margin: 0em;

我没有注意到任何东西,但是我的老师告诉我,这不一样。 p>

I didn't notice anything, but my teacher keeps telling me that it's not the same.

推荐答案

值为0时没有区别。如果是1和1em,是的,有一个区别,但0是0,无论单位。

There's no difference when the value is 0. If it were 1 and 1em, yes, there's a difference, but 0 is 0, no matter the unit.

这篇关于CSS差异在0和0em之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆