我想用一些文本在标题中制作一个带有背景颜色的HTML页面。我想完全像这样,但我没有得到这个特定类的CSS w3-container w3-teal
。横幅标题CSS不见了
任何人都可以告诉如何获得这些类的CSS。
这里是我从哪里拿到的链接。 https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_containers_div_header
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<body>
<div class="w3-container w3-teal">
<h1>Header</h1>
</div>
<div class="w3-container">
<p>The w3-container class can be used to display headers.</p>
</div>
</body>
</html>
链接断开。此外,这些w3schools甚至允许你热链接他们的CSS? – Webbanditten
你的例子应该很好。你需要检查'w3.css'文件是否为你加载。 –
只是注意到,如果有意义的话,你已经错过了'head'标签 –