如何在CSS中记住边框在边框外,并在里面填充 [英] How to remember in CSS that margin is outside the border, and padding inside

查看:477
本文介绍了如何在CSS中记住边框在边框外,并在里面填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不经常编辑CSS,几乎每次我需要去google和 CSS框模型以检查 padding 是否在 border margin 以外,反之亦然。 (再次检查, padding 在里面)。

I don't edit CSS very often, and almost every time I need to go and google the CSS box model to check whether padding is inside the border and margin outside, or vice versa. (Just checked again and padding is inside).

有没有人有一个很好的方法记住这个?一个小的记忆,一个很好的解释,为什么名字是这样的方式...

Does anyone have a good way of remembering this? A little mnemonic, a good explanation as to why the names are that way round ...

推荐答案

你疯了他们会把你的填充单元格的墙上的中的填充。

When working with CSS finally drives you mad the padded cell that they will put you in has the padding on the inside of the walls.

这篇关于如何在CSS中记住边框在边框外,并在里面填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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