gpt4 book ai didi

HTML/CSS - 文本装饰不起作用

转载 作者:行者123 更新时间:2023-11-28 04:22:00 26 4
gpt4 key购买 nike

我是 HTML 和 CSS 的初学者。所以,现在我有麻烦了。 text-decoration: none; 对我不起作用。你们能帮我找到解决办法吗?

* {
margin: 0px;
padding: 0px;
}

#Header {
width: auto;
height: 70px;
background-color: #647551;
margin-left: 0px;

}

#Header ul li {
text-decoration: none;
color: #645789;
float: left;
margin-left: 30px;

}
<!DOCTYPE html>
<html>
<head>
<link href="css/Main.css" type="text/css" rel="stylesheet" />
<meta charset="utf-8">
<title>Talkody - Gilles </title>
</head>
<body>
<div id="Header">
<ul>
<li>Home</li>
<li>About</li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</div>
<p>Dit is een test website waar ik alles uittest, hierna ga ik er verder op in</p>
<img source="images/Logo/TalkodyLogo.ai" />

</body>
</html>

最佳答案

您需要应用 list-style-type: none; 来删除元素符号

见下文:

* {
margin: 0px;
padding: 0px;
}

#Header {
width: auto;
height: 70px;

margin-left: 0px;

}

#Header ul li {
text-decoration: none;
color: #645789;
float: left;
margin-left: 30px;
list-style-type: none;

}
<body>
<div id="Header">
<ul>
<li>Home</li>
<li>About</li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</div>
<p>Dit is een test website waar ik alles uittest, hierna ga ik er verder op in</p>
<img source="images/Logo/TalkodyLogo.ai" />

</body>

text-decoration: none; 

将移除下面的文字装饰

underline     Defines a line below the text 
overline Defines a line above the text
line-through Defines a line through the text

关于HTML/CSS - 文本装饰不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42164673/

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