我是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>
答案 0 :(得分:0)
文字已经没有装饰,所以如果您想要从列表中删除项目符号,请使用:
ul {
list-style-type: none;
}
答案 1 :(得分:0)
如果您想从ul中删除项目符号,请尝试:
#header ul {
list-style-type: none;
}
如果要从链接中删除下划线,请使用:
#header li a {
text-decoration: none;
}
答案 2 :(得分:0)
您需要应用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
答案 3 :(得分:0)
您想将此添加到CSS:
#header ul {
list-style:none;
}
答案 4 :(得分:0)
* {
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;
list-style:none;
}
&#13;
<!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>
&#13;