The difference between block, inline, Inline-block

Source: Internet
Author: User

Block can be an inline element into a block-level element. and has the characteristics of block-level elements:

1. A single row full of the parent element;

2, the height and width of the property can be set;

3. You can set the value of margin and padding.

Inline can change block-level elements into inline elements and have the characteristics of inline elements:

1, will not occupy a single row, the element can be in a row, only one row in the line will not be another row;

2, Height and Width property alignment is invalid, is determined by the contents of the element in the row;

3, for margin and padding only horizontal direction will produce effect, vertical direction will not produce effect.

Inline-block can have elements with inline elements and block-level elements.

The difference between block, inline, Inline-block

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.