我需要帮助。我刚刚开始使用 CSS/HTML,我之前能够使用 CSS 更改网站中页面 header1 内容的颜色。现在我尝试了完全相同的代码行,它保持纯黑色。
这是HTML:
<!DOCTYPE HTML>
<html lang = "en">
<head>
<title>Pacific Trails Resort</title>
<link rel ="stylesheet" href="pacific.css">
<meta charset="utf-8">
</head>
<body>
<h1>Pacific Trails Resort</h1>
<div id="nav"><b>
<a href ="index.html">Home</a>
<a href ="yurts.html">Yurts</a>
<a href ="activities.html">Activities</a>
<a href ="reservations.html">Reservations</a>
</b></div>
<div id ="content">
<h2>Enjoy Nature In Luxury</h2>
<p><span class="resort">Pacific Trails Resort</span> offers a special lodging experience on the California North Coast.Relax
in sereninty with panoramic views of the Pacific Ocean.</p>
<ul>
<li>Private yurts with decks overlooking the ocean
<li>Activities lodge with fireplace and gift shop
<li>Nightly fine dining at the Overlook Cafe
<li>Heated outdoor pool and whirlpool
<li>Guided hiking tours of the redwoods
</ul>
<div id="contact">
<span class="resort">Pacific Trails Resort</span>
<br>12010 Pacific Trails Road
<br>Zephyr, CA 95555
<br>
<br>888-555-5555
</div>
<div id="contact"><small><i>
Copyright © 2011 Pacific Trails Resort
<br><a href= "mailto:nathan@griffin.com"> nathan@griffin.com</a>
</i></small></div>
</div>
</body>
</html>
这是 CSS 文件。(在 w3 网站上验证)
body{
color: #666666;
background-color: #ffffff;}
h1{
color: #000033;
background-color: #ffffff;
margin-bottom: 0;}
nav{
background-color: #90c7e3;}
h2{
color: #3399cc;}
dt{
color: #000033;}
.resort{
color: #000033;}
有人可以指出我哪里出错了吗