Home >Web Front-end >HTML Tutorial >A brief analysis of inline-block using inline-block to create layout_html/css_WEB-ITnose

A brief analysis of inline-block using inline-block to create layout_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:56:151019browse

Inline-block front-end programmers are certainly familiar with it. It is a value of the display attribute.

The reason why it is called inline-block. Because it has the characteristics of both inline elements (inline-element) and block-level elements (block-element).

  1. Block elements (block elements) , derived from the CSS box model. Block-level elements include width height, padding, border and margin, and they are arranged from top to bottom. Inline elements are arranged horizontally.
  2. Inline elements are arranged horizontally.
  3. Inline-block elements Internally, it behaves like a block element. For example, it has the width height of the block element, that is, it can set its own height and width values. You can set your own padding, border and margin, and the external arrangement is similar to inline elements, that is, arranged horizontally instead of from top to bottom like block-level elements.

 

  Replaced element

Speaking of this, it is necessary to mention the replacement element . What is a replacement element? In HTML, there are special elements such as:

 ||