Determine the baseline of each type of Box and the baseline of each type of Box

Source: Internet
Author: User

Determine the baseline of each type of Box and the baseline of each type of Box
Rule for determining the baseline of the Box 1.1 determine the baseline of the inline-block

The baseline of an 'inline-Block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visable', in which case the baseline is the bottom margin edge.

1.2 determine the baseline of the replacement

Bottom margin edge

1.3 determine the inline baseline

Is the baseline of the text it contains.

1.4 determine the inline-table baseline

The baseline of an 'inline-table' is the baseline of the first row of the table

1.5 determine the baseline of the block

Each block generally contains many row elements, so there are also many baseline items, each line corresponds to a line-box, line-box baseline determination is slightly complicated, see Chapter 2

1.6 determine the baseline of each line in the flex-box (may need to be changed in the future)

Use the baseline of the first line of the Flex-item with the highest height as the baseline of the current line of the flex-box.

1.7 determine the baseline of line-box (more complex)
  • First, unlike other types of boxes, CSS 2.1 does not define the position of the line box's baseline, so its baseline is uncertain, it will change with the change of the content or style of the element in the row. For more information, see section 2.
  • Which factors will affect the baseline position of line-box?
  • When an elem in a row is at the same height as line-box
  • The vertical-align set on this elem has no visual effect on the element because it has already reached the height of the current row, however, the baseline position of the current line-box is affected.
  • When a row contains multiple vertical-align elements with different values, the baseline position of line-box also moves the baseline of line-box to the appropriate position to satisfy all vertical-align values at the same time, the height of line-box in Zhe often changes.

 

 

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.