示例工程 01-what-is-css

01-what-is-css/demo-02-first-rule/style.css

css · 0.4 KB

运行:第一条 CSS 规则

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

body {
  margin: 0;
  padding: 40px 24px;
  background: #f8fafc;
  color: #0f172a;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.highlight {
  padding: 12px 14px;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 600;
}