首页 文章

保证金值之间有差异吗?

提问于
浏览
0

我正在设计一个div并在div中有一个div

<div id="header"><div id="header-top"></div></div>

“#header”具有深色背景颜色,“#header-top”具有浅色背景颜色 . “#header的边界半径也是7px .

在css中,“#header-top”有一个像这样的边距“margin:10px 0 0 10px;”因此它被向下推10px并向左推10px使其居中并且在浅色内部背景周围出现黑色边框 .

然而,似乎顶部'border'比边框更薄 . Does css make it such that 10px on top is different than 10px on the sides?

1 回答

相关问题