在编码方面,我是一个完全的新手。我现在正在学校学习 HTML 课程,但我尝试创建的页面有问题。我现在正在学习 CSS,在一个练习页面中,我使 #container 中包含的 box-shadow 没有出现在我的 div 中。当我打开“答案”页面来测试我的浏览器时,它会显示出来,但在我的页面上几乎没有相同的代码。任何帮助将不胜感激,因为这让我发疯。这是代码:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Lighthouse Bistro</title>
<meta charset="utf-8">
<style>
body {background-image: url(background.jpg);
font-family: Arial, Verdana, sans-serif;
}
h1 { background-image: url(lighthouselogo.jpg);
background-repeat: no-repeat;
height: 100px; width: 650px;
font-size: 3em;
padding-left: 150px; padding-top: 30px;
border: 1px solid #000033;
border-radius: 15px;
text-shadow: 3px 3px 3px #666;
}
h2 { color: #000033;
font-family: arial, sans-serif;
text-shadow: 1px 1px 0 #ccc;
}
#container { background-color: #ffffff;
padding: 20px;
width: 80%; min-width: 800px; max-width: 960px;
margin-right: auto;
margin-left: auto;
box-shadow: 5px 5px 5px #lelele;
}
footer { font-size: .80em;
font-style: italic;
}
</style>
</head>
<body>
<div id="container">
<header>
<h1>Lighthouse Bistro</h1>
</header>
<nav><a href="index.html">Home</a> <a href="menu.html">Menu</a>
<a href="directions.html">Directions</a> <a
href="contact.html">Contact</a></nav>
<main>
<h2>Locally Roasted Free-Trade Coffee</h2>
<p>Indulge in the aroma of freshly ground roast coffee. Specialty drinks are
available hot or cold.</p>
<h2>Specialty Pastries</h2>
<p>Enjoy a selection of our fresh-baked, organic pastries, including fresh-
fruit muffins, scones, croissants, and cinammon rolls.</p>
<h2>Lunchtime is Anytime</h2>
<p>Savor delicious wraps and sandwiches on hearty, whole-grain breads with
locally-grown salad, fruit, and vegetables. </p>
</main>
<footer>Copyright © 2014 Your Name Here</footer>
</div>
</body>
</html>