<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>A CSS Exercise</title>
<style type=”text/css”>
div {
font-weight: bold;
}
span {
font-style: italic;
}
</style>
</head>
<body>
<div>This is my web page.</div>
<div>This is the <span>nicest</span> page I’ve made yet.</div>
<div>Here is some text on my page.</div>
</body>
</html>
我在 ubuntu 12.04 中使用 mozilla firefox,使用 apache 网络服务器
最佳答案
您在 type 属性周围使用这些 ”
而不是这些 "
。
您可以使用那些 "
或那些 '
,但绝不能使用那些 ”
。
此外,以防万一你是新手,如果可能的话,无论如何都要将你的 css 放在一个额外的文件中;)
编辑:刚看到别人发布的答案比我快
关于html - firefox 不显示 html 文件的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34534228/