html - CSS3 没有链接到 HTML5?
问题描述
谁能告诉我为什么我的样式表不会链接到我的 html 文本?我觉得我已经在阳光下尝试了一切,现在只是茫然地盯着它。这可能是非常明显的事情。
h2 {
font-family: sans-serif;
text-align: center;
color: blue;
}
p {
font-family: sans-serif;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Konrad Zuse </title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" media="screen" />
</head>
<h2> Konrad Zuse </h2>
<p> Konrad Zuse was a German computer scientist who is responsible for creating the worlds first programmable computer. </p>
<p> He also designed the first high-level programming language, Plankakül. </p>
<p> Born on the 22<sup>nd</sup> of June 1910 in Berlin his family moved to Braunsberg, now know as Braniewo, Poland. His father worked as a postal clerk whilst Zuse attended Collegium Hosianum. Zuse passed his Abitur in 1928, meaning he could go on to study at university. Attending the Technische Hochschule Berlin, now Technical University of Berlin, Zuse studied engineering and architecture both of which he found tedious. He began a path down civil engineering and graduated in 1935. Once graduated Zuse began work at the Henschel aircraft factory in Berlin. He was made to calculate routine maths by hand and started to think up a machine that would do his calculations for him. </p>
解决方案
这里有一些提示。
当您加载页面时,右键单击页面并转到Inspect element
. 然后转到Network
选项卡,单击CSS
复选框并刷新页面。它将显示它尝试加载的 css。如果文件名是白色的,则加载 CSS。如果不是,则可能是路径问题。Network
如果您可以从控制台发布选项卡的图像会很酷
还。您缺少<body></body>
和结束</html>
标记。先处理好这个
推荐阅读
- forms - Vue表单空字段
- java - 使用 Spark 和 Java8 从 Dataframe 中获取多列的不同值的计数
- javascript - 在异步方法中循环对象
- jmeter - 无法通过 JMeter 发送 HTTP2 请求
- classification - 方差很大的一维数据的最佳判别方法
- hadoop - 如何使用 Hive 检查 Druid 数据源
- android - 在 Xamarin android 代码中找不到“ACCESS_BACKGROUND_LOCATION”权限。我需要检查用户是否已授予此权限
- java - Java API 获取特定时区一年的夏令时的开始和结束细节
- swift - SwiftUI - ForEach 是否有 endIndex 或 lastindex?
- javascript - 如何从 Firestore 获取多个文档