【问题标题】:How can I get rid of white space at the top of a HTML page on Dash? [duplicate]如何摆脱 Dash 上 HTML 页面顶部的空白? [复制]
【发布时间】:2020-10-21 10:12:57
【问题描述】:

我正在 Dash 上创建一个“博客”页面(与 General Assembly 一起学习),页面顶部有一些我似乎无法摆脱的空白?这是我用于标题的代码:

 header {
      text-align: center;
      background: linear-gradient(#f9eeaa, #f9d6aa);
      background-size: cover;
      color: #f78;
    }

有人对如何解决这个问题有任何建议吗?

【问题讨论】:

  • 请提供页面的所有 HTML 代码,以及它使用的 CSS。你给我们的细节太少了。如果可以,还请提供显示问题的屏幕截图。
  • 嘿,我添加了一个屏幕截图有帮助吗?

标签: html css whitespace


【解决方案1】:

根据您提供的信息,我会推荐以下 css 属性。

 *{margin:0;padding:0;} body {margin: 0;} header {margin: 0; top:0;}

【讨论】:

    【解决方案2】:

    如果我理解正确,您可以尝试添加: 边距:0;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-18
      • 1970-01-01
      • 2019-10-09
      • 1970-01-01
      相关资源
      最近更新 更多