gpt4 book ai didi

html - 需要帮忙。基本的 HTML/CSS。标题不变色

转载 作者:太空宇宙 更新时间:2023-11-04 00:04:54 24 4
gpt4 key购买 nike

我需要帮助。我刚刚开始使用 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>&nbsp;&nbsp;
<a href ="yurts.html">Yurts</a>&nbsp;&nbsp;
<a href ="activities.html">Activities</a>&nbsp;&nbsp;
<a href ="reservations.html">Reservations</a>&nbsp;&nbsp;
</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 &copy; 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;}

谁能指出我哪里出错了

最佳答案

改变:

nav { ... }

收件人:

#nav { ... }

关于html - 需要帮忙。基本的 HTML/CSS。标题不变色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15293011/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com