gpt4 book ai didi

css - css 中的属性优先级重要吗?

转载 作者:太空宇宙 更新时间:2023-11-03 21:48:18 25 4
gpt4 key购买 nike

在查看 Bootstrap 版本 3 的新 bootstrap.css 文件时,我发现了这个片段

hr {
height: 0;
-moz-box-sizing: content-box;
box-sizing: content-box;
}

在另一个 Split View中,我有 normalize.css 有这个片段

hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}

我为 normalize.css 片段找到了这条评论

/**
* Address differences between Firefox and other browsers.
*/

比较两者,height 属性在 bootstrap 中排在第一位,在 normalize 中排在最后。这有什么关系吗?

最佳答案

不,它没有。

很明显,只有当它是同一个属性或子属性时才有意义,比如先设置 padding-left 然后再设置 padding

关于css - css 中的属性优先级重要吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19195204/

25 4 0
文章推荐: javascript - jQuery Append 事件问题
文章推荐: opencv - 从 opencv 获取实时网络摄像头到 Unity
文章推荐: html - 如何增加