css - css中的负右边距

标签 css google-chrome-devtools

在 chrome 开发工具栏中,我在 responsive.css:1101 看到了这些细节 enter image description here

但是当我转到 responsive.css 的第 1101 行时,我没有找到 -20px 的 margin-right:

enter image description here

那么是什么导致了 -20px 的右边距?

我搜索了整个 responsive.css 但我找不到导致 -20px 右边距的规则。

在样式选项卡下

enter image description here

在同一时间的计算选项卡下

enter image description here

最佳答案

浏览器会自动计算该值。来自 MDN :

auto is replaced by some suitable value, e.g. it can be used for centering of blocks.

div { width:50%;  margin:0 auto; }

centers the div container horizontally.

关于css - css中的负右边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36404411/

相关文章:

google-chrome-devtools - Chrome 版本 32.0.1700.76 m 如何使用 Devtools 搜索源文件

javascript - 我如何知道 JS 代码是否使用 Google 跟踪代码管理器触发

css - 见 :hover state in Chrome Developer Tools

asp.net - 在顶部水平对齐 asp.net 菜单

css - 如何使 Google Picker iFrame 响应?

css - 当我在手机/平板电脑上看到它时,如何让我在 CSS 上编写的媒体查询在我的 Wordpress 网站上运行?

google-chrome - chrome开发者工具控制台没有扩展日志

javascript - 我可以 console.debug() 并在那里设置 Chrome 开发工具断点吗?

asp.net - ListView 中表格的 VB Css 背景色仅绘制表格的可见部分

javascript - 根据条件淡化图像并排列它们