我似乎无法去掉菜单中的元素符号。谁能帮帮我?
母版页代码:
<asp:Menu ClientIDMode="Static" ID="main_menu" runat="server" Orientation="Horizontal">
<StaticItemTemplate>
<div class="nav_style">
<asp:Label runat="server" Text='<%# Eval("Text") %>' />
</div>
</StaticItemTemplate>
<Items>
<asp:MenuItem NavigateUrl="~/home.aspx" Text="home" />
<asp:MenuItem NavigateUrl="~/what-it-can-do.aspx" Text="what it can do" />
<asp:MenuItem NavigateUrl="#" Text="pricing" />
<asp:MenuItem NavigateUrl="#" Text="news & events" />
<asp:MenuItem NavigateUrl="#" Text="partner with us" />
</Items>
</asp:Menu>
这是我的 CSS 代码:
.nav_style
{
list-style-type:none;
background-color:#242C32;
border-radius:3px;
color:#F5F5F5;
border-top:6px solid #242C32;
border-bottom:6px solid #242C32;
border-left:12px solid #242C32;
border-right:12px solid #242C32;
font:13px calibri;
}
这是生成的 HTML:
<div id="main_menu">
<ul class="level1">
<li><a class="level1 selected" href="home.aspx">
<div class="nav_style">
<span>home</span>
</div>
</a></li><li><a class="level1" href="what-it-can-do.aspx">
<div class="nav_style">
<span>what it can do</span>
</div>
</a></li><li><a class="level1" href="#">
<div class="nav_style">
<span>pricing</span>
</div>
</a></li><li><a class="level1" href="#">
<div class="nav_style">
<span>news & events</span>
</div>
</a></li><li><a class="level1" href="#">
<div class="nav_style">
<span>partner with us</span>
</div>
</a></li>
</ul>
</div>
编辑
似乎没有任何答案对我有用,还有其他建议吗?谢谢。
最佳答案
设法自己做了。在我的 css 文件中,为整个页面设置了元素符号背景
background:url('../img/blue_bullet.png')
所以我添加到我的CSS
.nav_style li
{
background:none;
}
关于html - 从 asp.net 菜单中删除元素符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23650990/