CSS style.css 文件未被 HTML 加载

问题描述 投票:0回答:1

这太尴尬了。我无法获取以下 css 文件进行渲染。我正在使用 github 页面来尝试教孩子们网站如何工作。当我们到达 CSS 部分时,我创建了这个名为 style.css 的文件。出于某种原因,我无法让它渲染 css 文件。我尝试过硬刷新,清除缓存,只有 1 个文件夹,所有内容都在其中。这很有趣,因为孩子们模仿了我输入的内容并得到了正确的结果。我缺少什么?我错过了一件非常明显的事情吗? https://nlnrose.github.io/Mr_Rose_Website_Project_23-24/

body{
  text-align: center;
  background-color: blue;/*#ebe1ca;*/
  }
h1{
  background-color:#11f2ee;
}
<html>
  <head>
    <title>Watercolor Painting</title>
    <!-- Replace the content in the following line with your name. -->
    <meta name="author" content="Mr. Rose">
    <link rel=“stylesheet”  href="./style.css"/>
  </head>
  <body style="margin-left: 30px;margin-right: 30px;">
    <!-- Replace the lines in this body with your content. -->
    <h1>Watercolor Painting</h1>
    <h2>My Techniques</h2>
    <p style="text-align:center;">There are <b>2</b> major kinds of watercolor painting. There is wet on wet and wet on dry.</p>
    <h2>My Paintings</h2>
    <p style="text-align:center;">
      Here you will see a picture of one of my paintings.<br/>
      <img style="text-align:center;" 
        src="snapinsta.jpg" 
        href="https://www.youtube.com/watch?v=eEXfQKabQGI" 
        width="500" height="625" 
        alt="Watercolor hummingbird on yupo paper."/>
    </p>
    <p style="margin-left: 50px;margin-right: 50px;">
      <a href="secondpage.html">More</a>
      <a href="https://www.youtube.com/watch?v=eEXfQKabQGI">A useful video</a>
    </p>
  </body>
</html>

html css styles github-pages
1个回答
0
投票

这现在会很痛苦...使用了 rel=“stylesheet” 的错误引号。将其更改为 *rel="stylesheet"。

© www.soinside.com 2019 - 2024. All rights reserved.