html - 有谁知道为什么 css 在我的 html 中不起作用?
问题描述
有谁知道为什么 css 在我的 html 中不起作用?它链接到我的html,但不起作用。它还在 chrome 检查 - css 选项卡中显示为空。我看到 css 正在链接,但不知道为什么它不工作.. 提前谢谢你!
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Quierra Marriott</title>
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="main.css">
</head>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 10px
font-family: 'Roboto', sans-serif;
color: #eee;``
}
body {
width: 100%;
height: 100%;
background: url() no-repeat center fixed;
background-size: cover;
}
解决方案
您的 CSS 无效:
html {
font-size: 10px /* You're missing a semi-colon here*/
color: #eee;`` /* You don't need the strings `` here...*/
...
您可能会对寻找 w3c css 验证器之类的工具感兴趣:https ://jigsaw.w3.org/css-validator/ 。
推荐阅读
- c# - 我怎样才能避免 == null 检查?
- dataset - 如何为多个报告使用相同的数据集?
- angularjs - 为什么调用 $scope.destroy() 后销毁范围不起作用
- django - 将多个字段传递给 django rest framework api
- amazon-web-services - Lambda、SQS 和 Cloudwatch - 架构问题
- android - 无法使用 MaterialTextView
- docker - 在docker中重定向nohup的输出不起作用
- vba - 导出为带有标题的 CSV
- rust - 从 glob-entry 获取文件路径以用于 fs::read_to_string
- angular - Angular - 比较字符串