Convert display to bulk, and convert display to bulk

Source: Internet
Author: User

Convert display to bulk, and convert display to bulk
Display: The block element occupies only one row, and multiple block elements create a new row. By default, the block element width automatically fills the width of its parent element. You can set the width and height attributes for the block element. A block-level element occupies only one row even if its width is set. You can set the margin and padding attributes for the block element. The display: inline element does not exclusive to a single row. Multiple Elements in the adjacent rows are arranged in the same row, and the width of a new row changes with the content of the element. The width and height attributes of the inline element are invalid. The margin and padding attributes of the inline element. The paintding-left, padding-right, margin-left, and margin-right attributes in the horizontal direction all generate the margin effect, but the padding-top attribute in the vertical direction, padding-bottom, margin-top, and margin-bottom do not produce margin effects. Display: inline-block: in short, the object is displayed as an inline object, but the content of the object is displayed as a block object. The Inline objects are arranged in the same row. For example, we can give a link (element a) inline-block attribute value so that it has both the width and height of the block and the characteristics of inline.

--- Restore content end ---

Related Article

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.