gpt4 book ai didi

Html 代码没有读取我的 css 样式脚本

转载 作者:太空宇宙 更新时间:2023-11-03 23:41:00 25 4
gpt4 key购买 nike

我正在尝试创建一个标签栏,但 CSS 代码不是红色的。我已经验证了 html 代码和 css 代码,但我找不到任何错误。

这是 html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>

<title> Canberras School Events Site </title>


<link rel="styleSheet" type="text/css" ref="CSS/style.css"/>

</head>

<body>

<div id="tabs">

<ul>
<li id="Selected"><a href="Index.html">HOME</a>
<li class="NotSelected"><a href="Pages\Events.html">EVENTS</a></li>
<li class="NotSelected"><a href="Pages\Places.html">PLACES</a></li>
<li class="NotSelected"><a href="Pages\Accommodation.html">ACCOMMODATION</a></li>
<li class="NotSelected"><a href="Pages\ContactUs.html">CONTACT US</a></li>
</ul>

</div>

</body>

</html>

和CSS

body {
background-color: #f0ff00;
}

/* border for the 1366 x 768 (height will change so you may have a scroll bar) */


/*This is the tabs*/

#tabs ul {
list-style: none;
padding:0;
margin:0;
position: absolute;
top: 5px;
right: 10px;
left: 200px;
}

#tabs li {

display: inline;
border: 1px solid;
border-bottom-width: 1px;
margin: 0 0.5em 0 0;
}

#tabs li a {
padding: 0 1em;
}

#content {
border: 1px solid;
clear: both;
}
#tabs #Selected {
padding-bottom: 1px;
background: #0101c3;
color: #f0ff00;
}
.NotSelected{
padding-bottom: 1px;
background: #fff;
color: #000000;
}

连背景都没有出现。

最佳答案

您似乎在这一行中省略了 h:

<link rel="styleSheet" type="text/css" ref="CSS/style.css"/>
^ should be href

关于Html 代码没有读取我的 css 样式脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22876408/

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