我想在我的HTML书中做一些项目,并且在练习中继续练习之前,我需要将嵌入式CSS移动到外部样式表。由于某些原因,即使在之前的练习中,我从来没有遇到过这个问题,但外部CSS仍未被拾取。HTML无法识别外部的CSS
这是HTML
Lighthouse Island BistroLighthouse Island Bistro
Locally Roasted Free-Trade Coffee
Indulge in the aroma of freshly ground roast coffee. Specialty drinks are available hot or cold.
Specialty Pastries
Enjoy a selection of our fresh-baked, organic pastries, including fresh-fruit muffins, scones, croissants, and cinnamon rolls.
Lunchtime is Anytime
Savor delicious wraps and sandwiches on hearty, whole-grain breads with locally-grown salad, fruit, and vegetables.
Panoramic View
Take in some scenery!
The top of our lighthouse offers a panoramic view of the countryside.
Challenge your friends to climb our 100-stair tower.
Copyright © 2016
而CSS
header, nav, main, footer, figure, figcaption { display: block; }
* {box-sizing: border-box; }
body { font-family: Verdana, Arial, sans-serif;
background-color: #00005D;
}
#wrapper { background-color: #b3c7e6;
color: #000066;
width: 80%;
margin: auto;
min-width:850px;
}
header { background-color: #869dc7;
color: #00005D;
font-size: 150%;
padding: 10px 10px 10px 155px;
background-image: url(lighthouselogo.jpg);
background-repeat: no-repeat;
}
nav { float: right;
width: 150px;
letter-spacing:0.1em;
font-weight: bold;
}
nav ul { list-style-type: none;
margin: 0;
padding: 0;
}
nav a { text-decoration: none;
display: block;
padding: 20px;
background-color: #b3c7e6;
border-bottom: 1px solid #ffffff;
background-image: url(sprites.gif);
background-repeat: no-repeat;
background-position: right 0;
}
nav a:link { color: #ffffff; }
nav a:visited { color: #eaeaea; }
nav a:hover { background-color: #eaeaea;
color: #869dc7;
background-position: right -100px; }
main { background-color: #ffffff;
color: #000000;
padding: 10px 20px;
overflow: auto;
}
h1 { margin-bottom: 20px; }
h2 { color: #869dc7;
font-family: arial, sans-serif;
}
#floatright { margin: 10px;
float: right;
}
footer {font-size:70%;
text-align: center;
padding: 10px;
background-color: #869dc7;
clear: both;
}
所有我想在这一点上做的是让我的HTML识别外部样式表,这样我就可以移动到更远的点。任何援助或指导找到这个练习的答案将不胜感激。
+0
您是否尝试在浏览器上进行硬刷新?有时候这些外部的js和css文件在浏览器的内存中被分割。其次是在同一个文件夹中的HTML文件和CSS文件? –
+0
我想这不言而喻,但要确保所有拼写都正确 –
+0
它不识别某些样式或所有样式吗? –