使用 Tachyons CSS 将一个部分直接放在另一个部分下方

Position a section directly below another section with Tachyons CSS

使用 Tachyons CSS Toolkit 我想将浅蓝色(请参阅下面的代码笔示例)区域直接移动到蓝色导航栏下方。

据我所知,<h1> 元素有一个 margin-top: 0.67em,它导致主题标题上方出现白色区域。

例子
https://codepen.io/anon/pen/eedwBE

只需将此添加到您的 css

h1, h2, h3 {
margin: 0;/* the margin you want */
}

并查看 CSS Selectors

In CSS, selectors are patterns used to select the element(s) you want to style.

使用我们的 CSS 选择器测试器来演示不同的选择器。

"CSS" 列表示 CSS 版本中的 属性 已定义(CSS1、CSS2 或 CSS3)。

这与标题元素的默认边距有关,它会溢出容器。

使用 Tachyons class "ma0"、"mv0" 或 "mt0".

将页边距(全部、垂直或顶部)设置为 0
<h1 class="f1 ma0">Theme Title</h1>