gpt4 book ai didi

html - 带有
    的类不起作用

转载 作者:行者123 更新时间:2023-11-28 04:49:17 27 4
gpt4 key购买 nike

<分区>

我刚开始学习 html/css,发现有些东西令人困惑。

这是我的简单网页:

<html>
<head>
<meta charset="utf-8">
<link rel = "stylesheet" type="text/css" href="styles/css/style.css" />
</head>
<body>
<ul class:"menu">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</body>
</html>

这是我的 CSS 文件:

 li {
list-style-type: none;
margin-left: -35px;
}

.menu
{
width:200px;
border: 1px solid #000;
font-family: 'Times New Roman';
color: #880000;
border-radius: 10px;
box-shadow: 5px 5px #880000;
background-color: #F9E497;
font-size: 11.4pt;
line-height: 1.5;
margin-top: 5px;
margin-bottom: 5px;

}

我不明白为什么我的代码不接受 .menu 类。当我在我的 css 文件中将 .menu 更改为 ul 时,一切都很好。我错过了什么?

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