yangshun/front-end-interview-handbook

element with display flex do not create a new BFC itself

Open

#159 opened on Jan 15, 2019

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (37,729 stars) (5,420 forks)batch import
help wanted

Description

In CSS section, the answer says "A BFC is an HTML box that satisfies at least one of the following conditions: ... The value of display is table-cell, table-caption, inline-block, flex, or inline-flex."

display flex create a new flex formatting context, not block formatting context. Only flex items (its children) create new BFC.

Contributor guide