Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

盒子模型 #49

Open
GGXXMM opened this issue Aug 30, 2019 · 0 comments
Open

盒子模型 #49

GGXXMM opened this issue Aug 30, 2019 · 0 comments
Labels

Comments

@GGXXMM
Copy link
Owner

GGXXMM commented Aug 30, 2019

CSS盒子模型(Box Model)

所有HTML元素可以看作盒子,在CSS中,"box model"这一术语是用来设计和布局时使用。
CSS盒模型本质上是一个盒子,封装周围的HTML元素,它包括:外边距margin、边框border、内边距padding和内容content,如下图所示:
image

  • margin(外边距):清除边框外的区域,外边距是透明的。
  • border(边框):围绕在内边距和内容外的边框。
  • padding(内边距):清除内容周围的区域,内边距是透明的。
  • content(内容):盒子的内容,显示文本和图像。

盒子模型分类

标准盒子模型

image

IE盒子模型

image

@GGXXMM GGXXMM added the css label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant