示例工程 43-subgrid
43-subgrid/demo-01-rows/index.html
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>行子网格</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>行子网格</h1>
<p>正文长短不同,页脚对齐。</p>
<div class="grid">
<article class="card">
<h2>短</h2>
<p>一行正文。</p>
<button type="button">选择</button>
</article>
<article class="card">
<h2>长</h2>
<p>正文长一些,占了两三行,但按钮仍然和旁边对齐。</p>
<button type="button">选择</button>
</article>
<article class="card">
<h2>中</h2>
<p>两行左右的正文。</p>
<button type="button">选择</button>
</article>
</div>
</body>
</html>