示例工程 09-display-normal-flow
09-display-normal-flow/demo-02-flow-root/style.css
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
body {
margin: 0;
padding: 32px;
background: #f8fafc;
color: #0f172a;
font-family: system-ui, sans-serif;
line-height: 1.7;
}
h1 {
margin: 0 0 8px;
font-size: 26px;
}
h2 {
margin: 18px 0 6px;
font-size: 15px;
color: #64748b;
}
.parent {
padding: 10px;
border: 2px solid #2563eb;
border-radius: 8px;
background: #eff6ff;
}
.parent.flow-root {
display: flow-root;
}
.float {
float: left;
width: 100px;
height: 70px;
border-radius: 6px;
background: #0f172a;
color: #ffffff;
display: grid;
place-items: center;
font-size: 12px;
}
.hint {
color: #64748b;
font-size: 12px;
}