项目符号不会从无序列表中消失?
Bullets wont disappear from unordered list?
如何去掉列表项旁边的项目符号。列表样式类型设置为 none。当我在 HTML 文件中包含 CSS 时,项目符号不存在。当我将 CSS 与 HTML 分开时,它们出现了。
我的 HTML:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="navBarStyle.css">
</head>
<body>
<ul>
<li><a href="http://www..com/" target="mainFrame">Home</a></li>
<li><a href="http://www..com/events.html" target="mainFrame">Schedule</a></li>
<li><a href="http://www..com/results.html" target="mainFrame">Results</a></li>
<li><a href="http://www..com/leagueinfo.html" target="mainFrame">League</a></li>
<li><a href="http://www..com/map.html" target="mainFrame">Map</a></li>
<li><a href="http://www..com/membership1.html" target="mainFrame">Membership</a></li>
<li><a href="http://www..com/workdates2014.html" target="mainFrame">Workdates</a></li>
</ul>
</body>
</html>
我的CSS:
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
font-size: 25px;
font-family: Papyrus Regular;
text-decoration: none;
color: white;
background-color: blue;
width: 200px;
padding: 50px;
margin: 20px;
height: 50px;
padding: 1px;
box-shadow: 10px 10px 5px grey; }
}
</style>
您的 css 语法错误 - } 两次。
此外,您不需要在 .css 文件
中使用 html 标签
如何去掉列表项旁边的项目符号。列表样式类型设置为 none。当我在 HTML 文件中包含 CSS 时,项目符号不存在。当我将 CSS 与 HTML 分开时,它们出现了。 我的 HTML:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="navBarStyle.css">
</head>
<body>
<ul>
<li><a href="http://www..com/" target="mainFrame">Home</a></li>
<li><a href="http://www..com/events.html" target="mainFrame">Schedule</a></li>
<li><a href="http://www..com/results.html" target="mainFrame">Results</a></li>
<li><a href="http://www..com/leagueinfo.html" target="mainFrame">League</a></li>
<li><a href="http://www..com/map.html" target="mainFrame">Map</a></li>
<li><a href="http://www..com/membership1.html" target="mainFrame">Membership</a></li>
<li><a href="http://www..com/workdates2014.html" target="mainFrame">Workdates</a></li>
</ul>
</body>
</html>
我的CSS:
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
font-size: 25px;
font-family: Papyrus Regular;
text-decoration: none;
color: white;
background-color: blue;
width: 200px;
padding: 50px;
margin: 20px;
height: 50px;
padding: 1px;
box-shadow: 10px 10px 5px grey; }
}
</style>
您的 css 语法错误 - } 两次。 此外,您不需要在 .css 文件
中使用 html 标签