Home > front end >  Questions about block formatting context with a floating elements
Questions about block formatting context with a floating elements

Time:09-16

Grade block formatting context is a block-level element of rendering area, decide how block-level element layout,
The floating element will be implicitly converted to block boxes, the floating element is also involved in grade block formatting context?
Create landing the floating element can package element because landing the rendering area can't and the outside world interact
, but landing the parcel location element, whether it can be said that the floating also participated in the formatting context, and positioning element is not involved in formatting context,
 
. P {
Background: lightblue;
Padding: 20 px;
overflow: hidden;
}
. P> Div {
width: 200px;
height: 200px;
float: left;
background: red;
}
Ada




CodePudding user response:

Set up floating, flex, positioning (absolute positioning, fixed location), are landing

CodePudding user response:

Positioning elements can also participate in formatting context, but to look at what is positioning and trigger a landing the mechanism methods: 1, 2, its floating overflow value as long as not visibility can trigger 3, the display value of the inline - block 4, fixed position and absolute positioning
  • Related