gpt4 book ai didi

css - 损坏的外部样式表

转载 作者:行者123 更新时间:2023-11-27 23:16:43 25 4
gpt4 key购买 nike

我正在为我在大学的一门类(class)制作一个假网站。在尝试链接我的外部样式表后,我仍然无法找到如何将它与我的 html 文档正确集成。该链接似乎是正确的,甚至在 chrome 的检查元素中列出,但是没有显示任何样式。

我曾尝试查找所有内容,从我的教科书到 YouTube 视频,但都没有找到。我不知道导航选项卡或我的一个 div 是否与任何不起作用的东西有关。

<!DOCTYPE html>
<html>
<head>
<title> About Us! </title>
<link rel="fusionStyles" type="text/css" href="fusionStyles.css">
</head>
<h1> Food Fusion </h1>
<img src="photos/logo.jpeg.jpeg" alt="logo" />
<nav>
<ul class="header">
<li> <a href="index.html">Home</a> </li>
<li> <a href="breakfast.html">Breakfast</a> </li>
<li> <a href="extras.html">Appetizers and Extras</a> </li>
<li> <a href="lunch.html">Lunch</a> </li>
<li> <a href="dinner.html">Dinner</a> </li>
<li> <a href="aboutus.html">About Us</a> </li>
<li> <a href="locations.html">Locations</a> </li>
<li> <a href="contact.html">Contact Us</a> </li>
<li> <a href="events.html">Events</a> </li>
<li> <a href="order.html">Online Ordering</a> </li>
</ul>
</nav>
</header>
<h1> About Us! </h1>
<body>
<p> Default text. <p>
<img src="photos/generic.jpeg.jpeg" alt="interior" />

<p> More Default text. </p>
</body>
<footer>
<div class="navbar">
<a href="survey.html">Click here to take a quick survey about our
performance! </a>
<a href="employment.html"> Want to join our staff? Click here!</a>
<p> &copy; </p>
</div>
</footer>
</html>

最佳答案

标签上的 rel 属性指定了 HTML 文件和 CSS 文件之间的关系。为了将您的“fusionStyles.css”指定为样式表,您必须像这样指定它: <link rel="stylesheet type="text/css" href="fusionStyles.css" />

关于css - 损坏的外部样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58240728/

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