Today, no other study, decided to brush some of the interview questions and see
"CSS articles."
1. CSS box model, absolute and relative positioning
Box model: there is an element content (content), padding (the padding), border (border), margin (outer filler) composed of four parts, which is composed of four parts to the box model css
Absolute positioning: position: absolute fixed positioning: position: fixed
2. Clear the float, when you need to clear the float, which has cleared the floating method
When out of the document flow, causing high collapse
方法:clear:both overflow:hidden || auto
3. how to maintain the horizontal and vertical center blanket
(1) by the positioning and transform
.children{
position:absolute;
left:50%;
top:50%;
transform:translate(-50% -50%);
}
(2) Using flexbox
.parent{
display:flex;
justify-content:center;
align-items:center;
}