【问题标题】:How to link css in html如何在html中链接css
【发布时间】:2022-12-20 14:36:20
【问题描述】:

这是我的网址https://dcnetwork.xyz。在这里我的 CSS 不工作我不知道这些是我的文件 index.html 和 style.css 的原因

Html Css

【问题讨论】:

  • 欢迎来到 SO,请花一些时间阅读有关如何提问的链接。这将有助于避免您的问题被否决,并帮助其他人重现该问题stackoverflow.com/help/how-to-ask

标签: html css


【解决方案1】:

我能看到的唯一错误是你没有关闭标签(第 4 行的末尾) 只需在行尾添加“>”。

CSS 文件加载并为我正常工作。

如果您看不到 CSS 更改 - 有时进行硬刷新/重新加载会有所帮助:

  • 适用于 Windows 的 Chrome、Firefox 或 Edge:按 Ctrl+F5(如果没有 工作,请尝试 Shift+F5 或 Ctrl+Shift+R)。
  • 适用于 Mac 的 Chrome 或 Firefox:按 Shift+Command+R。

【讨论】:

    【解决方案2】:

    我们必须简单地写 <link r el="stylesheet" h r e f="" 在头部仅显示在下方

    <!DOCTYPE html>
    <html>
      <head>
      <link r e l=" s t l y e sheet" h r e f="styles.css">
      <title>Movie Booking</title>
      </head>
    </html>
    

    这里“styles.css”是包含 c s s 属性的 c s s 文件

    【讨论】:

      猜你喜欢
      • 2013-12-18
      • 2019-01-23
      • 1970-01-01
      • 1970-01-01
      • 2016-10-03
      • 2014-02-26
      • 2016-07-14
      • 2013-08-27
      • 1970-01-01
      相关资源
      最近更新 更多