我在 jquery 中有这个 megamenu 内置在一个列表中,但是要对其进行数据绑定,我正在使用<asp:menu>
控件。这个特定的列表,我想在菜单控件中构建,但是菜单控件在标记上放置了自己的 css 类而不是我的。
链接到 megamenu: http: //www.designchemical.com/lab/jquery-mega-drop-down-menu-plugin/options/
我有.net 4并将渲染模式设置为列表..
我试过的:
- https://code.google.com/p/aspnetcontroladapters/wiki/Menu
- http://cssfriendly.codeplex.com/
- 把 !important 放在我所有的 CSS 中
- .net 4 和渲染模式列表
它仍然将这些 AspNet-Menu-Vertical 放在我想摆脱的标记中。
我的列表:
<li><a href="test.html">Parent</a>
<ul>
<li><a href="#">ParentChild</a>
<ul>
<li><a href="#">Child</a></li>
<li><a href="#">Child</a></li>
<li><a href="#">Child</a></li>
</ul>
</li>
</ul>
</li>
这就是我的硬编码列表呈现的,一个完美的大型菜单。
<ul class="mega-menu" id="mega-menu-1">
<li class="dc-mega-li">
<a href="./" class="dc-mega">Ögon<span class="dc-mega-icon"></span></a>
<div class="sub-container mega" style="left: 0px; top: 50px; z-index: 1000;"><ul class="sub" style="display: none;">
<div class="row" style="width: 720px;"><li class="mega-unit mega-hdr" style="height: 293px;">
<a href="#" class="mega-hdr-a" style="height: 18px;">Ögonskuggor</a>
<ul>
<li><a href="#">Bas</a></li>
<li><a href="#">Luniere</a></li>
</ul>
</li>
</div>
</ul></div>
</li>
</ul>
我的菜单代码
<asp:Menu ID="Menu1" runat="server" RenderingMode="List">
<Items>
<asp:MenuItem Text="parent" Value="parent 1">
<asp:MenuItem Text="parentchild" Value="pchild 1">
<asp:MenuItem Text="child" Value="child 1"></asp:MenuItem>
</asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
它呈现如下:
<div id="megamenu1" class="AspNet-Menu-Vertical" style="float: left;">
<ul class="AspNet-Menu static" tabindex="0" style="position: relative; width: auto; float: left;" role="menu">
<li class="AspNet-Menu-WithChildren has-popup static" aria-haspopup="megamenu1:submenu:2" role="menuitem" style="position: relative;">
<a class="AspNet-Menu-Link static" href="javascript:__doPostBack('megamenu1','b1')" tabindex="-1">
Ögon</a>
<ul id="megamenu1:submenu:2" style="display: none; position: absolute; top: 0px; left: 100%;" class="dynamic">
<li class="AspNet-Menu-WithChildren has-popup dynamic" aria-haspopup="megamenu1:submenu:3" role="menuitem" style="position: relative;">
<a class="AspNet-Menu-Link dynamic" href="javascript:__doPostBack('megamenu1','b1\\2')" tabindex="-1">
Ögonskuggor</a>
<ul id="megamenu1:submenu:3" style="display: none; position: absolute; top: 0px; left: 100%;" class="dynamic">
<li class="AspNet-Menu-Leaf dynamic" role="menuitem" style="position: relative;">
<a class="AspNet-Menu-Link dynamic" href="javascript:__doPostBack('megamenu1','b1\\2\\3')" tabindex="-1">
Bas</a>
</li>
<li class="AspNet-Menu-Leaf dynamic" role="menuitem" style="position: relative;">
<a class="AspNet-Menu-Link dynamic" href="javascript:__doPostBack('megamenu1','b1\\2\\4')" tabindex="-1">
lumiere</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
请帮忙谢谢