gpt4 book ai didi

html - 为什么 -webkit-margin-before (and after, start, end) 没有被我明确的边距和填充规则覆盖?

转载 作者:行者123 更新时间:2023-11-28 10:51:07 25 4
gpt4 key购买 nike

我有:

html body nav figure {   /* just to clear specificity doubts  */
margin: 0;
padding: 0;
bottom: 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
background-color: yellow;
}

我检查了 chrome 中的元素,并应用了我的规则,还应用了用户代理样式表中的以下内容:

figure {
display: block;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 40px;
-webkit-margin-end: 40px;
}

我认为这些应该被覆盖...我的规则也没有被覆盖(没有划掉)

我应该如何覆盖它们?

最佳答案

我解决了。

应用用户指定的规则,webkit 根据它呈现边距,以某种方式“覆盖”默认的 -webkit 规则。

我看到的空间来自未显示为 block 的 img,请参阅 this有关更多信息。

关于html - 为什么 -webkit-margin-before (and after, start, end) 没有被我明确的边距和填充规则覆盖?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20502107/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com