html - CSS 未加载

标签 html css

我写了一段 CSS,但它不会影响我的页面的显示方式。 我在我的 HTML 标签中使用:

<link rel="stylesheet" type="text/css" href="style.css" />

我的 style.css 文件如下所示:

@import('CSS/modal.css');
@import('CSS/menu.css');
@import('CSS/content.css');
@import('CSS/footer.css');
@import('CSS/title.css');

然而当我使用它时:

#title {
  font-size: 5em;
}

测试它是否真的不加载 CSS。

关于 HTML 的这一部分:

 <body>
    <div id="title">
      AMP
    </div>
 </body>

它仍然不显示 5em 中的文本。

编辑: 似乎当我将 CSS3 代码直接放入 style.css 并且不让它运行在 @import() 函数上时,它确实加载正确,但为什么它不再工作了?昨天运行良好,一直运行良好。

最佳答案

从选择器中删除 .css:

#title {
  font-size: 5em;
}

#text.css 选择器表示“选择一个同时具有 title id 和 css class 的元素”。

关于html - CSS 未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18405151/

相关文章:

html - 将导航菜单居中

unicode - CSS 'content' 属性中允许的字符?

jquery - 在没有空元素的情况下在 Bootstrap-Select 中显示标题

javascript - DIV-元素绝对(!)定位

javascript - CSS 和 PHP 运行 exec 并返回原始页面

css - 如何水平对齐一行中的 3 个跨度?

android - polymer 核心覆盖层不再滚动

html - 你好是未定义的

javascript - 我正在尝试从 Bootstrap 创建默认弹出窗口

css - 移动 Css 和桌面 Css 设置