![](/img/trans.png)
[英]my background image is not showing and appears grey in my html/css. kindly help. i combine my css and html in one sheet
[英]Need help. Basic HTML/CSS. Headers not changing color
我需要幫助。 我只是啟動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;}
有人可以指出我要去哪里了嗎
更改:
nav { ... }
至:
#nav { ... }
對我來說似乎很好。
請注意,您將其設置為#000033
,這是一個非常深的藍色(正確應用,但是可能會丟失,因為它類似於黑色)。
當我隨意將其更改為其他顏色(即#BADA55
)時,它仍然可以正常工作並且更明顯。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.