Home > Web Front-end > CSS Tutorial > Detailed graphic explanation of css layout method

Detailed graphic explanation of css layout method

高洛峰
Release: 2017-03-27 10:50:34
Original
1945 people have browsed it

Overview of css layout methods

图文详解css布局方式

#css layout methods are divided into parts

css layout methods

  • The layout inside the box

    • The layout of the text

    • The layout of the box itself

  • Visual formmatting between boxes

    • BFC (block formatting context) Layout under layout context

    • IFC Layout under layout context

    • FFC Layout under layout context

    • table Layout under layout context

    • css grid layout context layout

    • absolute layout context layout

    • float layout context layout,

    • The layout of the box out of the normal normal flow

    • The layout of the box under the normal normal flow

1. The layout inside the box

  • The layout of the text

    • There are line boxes wrapping each line of text, this It is invisible;

    • line boxes will take the highest line-height of the child element

    • You can set the level of a single line of text through line-height Centered

  • box layout
    图文详解css布局方式

Picture source w3c

2. box The layout between

  • absolute layout (detached from the document flow)

  • float layout (detached from the document flow)

  • normal flow (layout of normal document flow) (context)

    • #If any of the following conditions is met, a child element will be created. New bfc context

    • Root element (body)

    • float element is not none

    • overflow is not visible

    • display is inline-block, table-cell, table-caption

    • The value of postition is absolute, fixed

    • bfc (block formatting context) block-level document context

    • ##ifc (Inline formatting contexts) inline block-level context

    • ffc ( Flex Formatting Contexts ) Flexible formatting context

    • table ( table formatting context ) Table layout context

    • grid ( grid formatting context ) Grid formatting context

The above is the detailed content of Detailed graphic explanation of css layout method. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template