Massive HTML, the inner element associated with the block distinguishing

html elements can be divided into three types: block, inline, inline block

1, a block element
features:
1) a block element on a separate line
2) the element height, width, line height and top and bottom margins can be set
3) the width of the element is not provided in the case, is the parent container itself (uniform width and parent element) is set to 100% until a width
such as: div, h label, p, form, ul, li


2, inline elements (inline elements )
Characteristics:
1) and other elements on one line
2) the element height, width, and top and bottom margins can not be set
width 3) is the width of the elements it contains text or images unchangeable
as: span, a, I, EM, strong


. 3, an inline block element
is also have the characteristics of inline elements and block element
1) and the other elements are on one line
height of 2) elements, width, line height and top and bottom margins can be set
such as: IMG, INPUT


. 4 , the display attribute value of the
block: block elements
inline: inline elements
inline-block: block elements inline


 

Guess you like

Origin www.cnblogs.com/chen-wei123/p/12527163.html