简体   繁体   English

列表样式不删除项目符号

[英]list-style not removing bullet points

I have an ul with 5 li and links i am trying to create a nav bar with.我有一个 5 里的 ul 和我正在尝试创建导航栏的链接。 I am very new to HTML and CSS but have done this on a previous mock project with no issues.我对 HTML 和 CSS 非常陌生,但在以前的模拟项目中这样做没有问题。 But for some reason now that I have switched to atom I cant get this to work and do not understand why.但是由于某种原因,现在我已经切换到 atom 我无法让它工作并且不明白为什么。 If it helps when I type either list-style or list-style-type the color of the code doesn't change as if I was to code color: red;如果在我键入 list-style 或 list-style-type 时它有帮助,则代码的颜色不会改变,就像我要编码 color: red; in the same section where red would change colors.在同一部分,红色将更改 colors。 The list-style: none;列表样式:无; stays gray.保持灰色。 Anyone see what I may have done wrong?有人看到我可能做错了什么吗? Is there a step that I have missed?有没有我错过的步骤?

index.html索引.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Fitness Website</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
<ul>
  <li><a href="#">Home</a></li>
  <li><a href="#">Contact</a></li>
  <li><a href="#">Login</a></li>
  <li><a href="#">Signup</a></li>
  <li><a href="#">Cart</a></li>
  <li><a href="#">Become an Instructor</a></li>
</ul>

style.css样式.css

* {
  margin: 0;
  padding: 0;
}

ul {

}

ul li {
list-style: none;
}

ul li a {}

So I found out that when trying to split the style.css tab to the right, I deleted the original which wouldn't allow the style.css sheet I was coding on to make any changes.所以我发现当试图将 style.css 选项卡拆分到右侧时,我删除了不允许 style.css 表我正在编码以进行任何更改的原始文件。 I copied all of the code, moved to a new project, and boom.我复制了所有代码,转移到一个新项目,然后繁荣。 Good to go.对 go 好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM