gpt4 book ai didi

html - 如何从嵌套在 Div 中的无序列表中删除元素符号?

转载 作者:太空宇宙 更新时间:2023-11-04 06:25:06 25 4
gpt4 key购买 nike

我不明白为什么我的代码不起作用。我想移除我的 ul anchor 上的子弹。但是“ul {list-style: none;} 不工作。

这是我的代码:

<div class="nav-wrapper">
<div class="logo">
<!-- <a href="/">Logo</a> -->
</div>
<div class="main-page-links">
<ul>
<li><a href="">MENU</a></li>
<li><a href="">WEEKLY EVENTS</a></li>
<li><a href="">FILLER</a></li>
<li><a href="">FILLER</a></li>
</ul>
</div>
<div class="gallery">
<img src="" alt="image galleries">
</div>

</div>

这是 Css:

*{
margin: 0;
padding: 0;
box-sizing: border-box;}

body{
height: 100%;
}

.nav-wrapper{
display: grid;
grid-template-columns: repeat(6, 1);
grid-template-rows: 8;

height: 100px;
width: 900px;}

ul { list-style: none;} /* I thought this would do it */

最佳答案

也许你的浏览器被缓存了,尝试在你正在使用的页面上使用control+shift+R,你的代码在这里没问题

*{
margin: 0;
padding: 0;
box-sizing: border-box;}

body{
height: 100%;
}

.nav-wrapper{
display: grid;
grid-template-columns: repeat(6, 1);
grid-template-rows: 8;

height: 100px;
width: 900px;}

ul { list-style: none;}
<div class="nav-wrapper">
<div class="logo">
<!-- <a href="/">Logo</a> -->
</div>
<div class="main-page-links">
<ul>
<li><a href="">MENU</a></li>
<li><a href="">WEEKLY EVENTS</a></li>
<li><a href="">FILLER</a></li>
<li><a href="">FILLER</a></li>
</ul>
</div>
<div class="gallery">
<img src="" alt="image galleries">
</div>

</div>

关于html - 如何从嵌套在 Div 中的无序列表中删除元素符号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55154198/

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