html5day9

         day9知识点

The display of css classifies tags:
block elements
, inline elements (inline elements),
dispute points:
third category:
a: variable elements
b: inline block elements

元素类型分类:块状元素、内联元素、可变元素。  注:把行内块元素 归在 内联元素这一类里面
默认情况下元素类型每个类型特点:
    块状元素特点:
        1:在页面中以矩形区域显示。
        2:自上而下排列,独占一行
        3:可以直接添加宽高
        4:一般情况下,作为其他元素或内容的容器
    内联元素特点:
        1:在页面中最小单位也是矩形。
        2:在一行内逐个排列。
        3:不可以直接添加宽高,大小是由内容撑开的。
        4:内联元素也符合盒模型的规则,但是个别属性会出现问题(padding-top/bottom    margin-top/bottom)
        5: 内联元素在一行内排列的时候,之间有间距
            (怎么消除间距:   
                a:添加浮动  
                b:把所有的内联元素都放在一行不用回车键(不推荐使用)。  

  可变元素(了解):
        根据上下文的显示,来确定这个元素是块状元素还是内联元素
                              
哪些标签属于块 哪些标签属于内联:  

Block elements:
div-most commonly used block-level element
dl- block-level element used with dt-dd
form-interactive form
h1 -h6- headline
hr-horizontal divider
ol-ordered list
p-paragraph
ul-none Sequence table
li
fieldset-form field set
colgroup-col-form column grouping element
table-tr-td table and row-cell
inline element:
a – hyperlink (anchor)
b-bold (not recommended)
br-line break
i-Italic
em-Emphasize
img-Image
input-Input box
label-Form label
span-Common inline container, define the block within the text
strong-Bold emphasized
sub-Subscript
sup-Superscript
textarea-Multiline text input box
u -Underline
selection-item selection

Element type conversion:
display attribute:
role: retrieve or set the box model type generated by the element.
Common attribute values:
1: display: block;
Function: convert the element into a block element, with the characteristics of block elements.
Supplement: For most block elements, the default display value is block;
2: display: inline;
Function: convert the element into an inline element, with the characteristics of inline elements.
Added: Most inline elements, the default display value is inline;
3: display: none;
Function: hide the current, does not occupy space.

Published 21 original articles · liked 0 · visits 289

Guess you like

Origin blog.csdn.net/jiatinghui/article/details/105129943