Skip to content

48.[CSS]行内元素有哪些?块级元素有哪些?CSS 的盒模型? #48

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

Open
webVueBlog opened this issue Mar 15, 2020 · 1 comment
Labels
css css

Comments

@webVueBlog
Copy link
Member

[CSS]
Css 的盒模型:从外到里,margin,border,padding,content。

块元素在页面里,占一行,可以设定宽和高,可以容纳块元素和行内元素。

常见 的块元素有 div,p,h1-h6,ul 等。 行内元素没有宽和高的属性但可以与其他元素同一行,一般不可以包含块元素, 行内元素的高度一般由元素内部的字体大小决定,宽度由内容的长度控制。

常见的行 内元素有 a,b,span,strong,em 等。

@webVueBlog webVueBlog added the css css label Mar 15, 2020
@webVueBlog
Copy link
Member Author

Css box model: from the outside to the inside, margin, border, padding, content.

Block elements are in the page, occupying one line, can be set wide and high, can hold block elements and inline elements.

Common block elements are div, p, h1-h6, ul, etc. Inline elements have no attributes of width or height, but they can be on the same line as other elements. Generally, they cannot contain block elements. The height of inline elements is generally determined by the font size inside the element, and the width is controlled by the length of the content.

Common inline elements are a, b, span, strong, em, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css css
Projects
None yet
Development

No branches or pull requests

1 participant