我的 CSS 中有这个:
.MainMenu
{
position: absolute;
top:105px;
left:15px;
background-color: #67E300;
color:White;
border-style:double;
border-color:White;
list-style-type:none;
}
MasterPage 里面的这个:
<div class="MainMenu">
<uc2:MainMenu ID="MainMenu1" runat="server" />
</div>
最后是 UserControl MainMenu 中的这段代码:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MainMenu.ascx.cs" Inherits="LoCompro.UserControls.MainMenu" %>
<ul>
<li>Inico</li>
<li>Navegar Por Categoria</li>
<li>Navegar Por Marca</li>
<li>Buscar</li>
</ul>
编辑(忘了问问题了,哈哈):
使用该代码不会删除元素符号列表。我不需要任何子弹,因为我想模拟一个菜单。
谢谢大家。 :D
最佳答案
尝试将 list-style-type
放在 UL
上,而不是放在包含 UL 的 DIV
上。
.MainMenu
{
position: absolute;
top:105px;
left:15px;
background-color: #67E300;
color:White;
border-style:double;
border-color:White;
}
.MainMenu ul
{
list-style-type:none;
}
关于asp.net - 如何使用 CSS 从无序列表中删除元素符号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1316752/