示例工程 04-cascade-specificity-inheritance
04-cascade-specificity-inheritance/demo-01-specificity/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: 28px;
}
p {
color: #64748b;
}
.note {
color: #2563eb;
}
#target {
color: #dc2626;
font-weight: 700;
}
code {
padding: 1px 5px;
border-radius: 4px;
background: #f1f5f9;
font-family: ui-monospace, monospace;
}