【问题标题】:Bullets wont disappear from unordered list?项目符号不会从无序列表中消失?
【发布时间】:2020-06-30 04:00:14
【问题描述】:

如何去掉列表项旁边的项目符号。列表样式类型设置为无。当我在 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>

【问题讨论】:

    标签: html css html-lists


    【解决方案1】:

    您的 css 语法有错误 - } 两次。 此外,您不需要在 .css 文件中使用 html 标记

    【讨论】:

    • 谢谢,我去掉了多余的“}”,问题就解决了。我还删除了 html 标签。
    猜你喜欢
    • 2010-10-09
    • 2011-04-28
    • 1970-01-01
    • 2010-12-08
    • 2015-07-10
    • 2017-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多