如何使用站点地图数据源在asp.net菜单中制作向下箭头?
我在 asp.net 中的菜单显示在右上角,但我希望它向下。这是我的网站的网址 http://www.theucreate.com/default.aspx< br> 在我们的操作菜单中,它显示右侧而不是向下的箭头。
CSS Code :
.menuItem
{
border:Outset 1px black;
background-color:Gray;
font:14px Arial;
color:White;
padding:3px;
position:relative;
z-index: 9999;
width:125px;
text-align:center;
}
菜单代码:
<asp:SiteMapDataSource ID="srcSiteMap" Runat="server" ShowStartingNode="false" />
站点地图代码:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode
url="~/Default.aspx"
title="Home"
description="The home page of the Website">
<!-- SiteMapPath Nodes -->
<siteMapNode
title="Home"
description="Home">
</siteMapNode>
<!-- Menu Nodes -->
<siteMapNode
title="What we do"
description="Group of companies">
<siteMapNode
url="~/UsingMenu/MenuSiteMap.aspx"
title="ADMG logo"
description="Abu Dhabi Marketing Group" />
<siteMapNode
url="~/UsingMenu/MenuSiteMap.aspx111"
title="JamalMedia Logo"
description="Jamal Media" />
<siteMapNode
url="Images/images/Emirates Palace.jpg"
title="AFKARsoft Logo"
description="AFKARsoft"/>
</siteMapNode>
<!-- TreeView Nodes -->
<siteMapNode
title="Portfolio"
url=""
description="">
</siteMapNode>
<siteMapNode
title="Download"
description="">
</siteMapNode>
<siteMapNode
title="News Blog"
description="">
</siteMapNode>
<siteMapNode
title="About Us"
description="">
</siteMapNode>
<siteMapNode
title="Awards"
description="">
</siteMapNode>
<siteMapNode
title="Contact Us"
description="">
</siteMapNode>
</siteMapNode>
</siteMap>
My menu in asp.net show on the right corner, but I want it to be downward. Here is the url of my website http://www.theucreate.com/default.aspx
In what we do menu it shows the arrow on the right rather than down.
CSS Code :
.menuItem
{
border:Outset 1px black;
background-color:Gray;
font:14px Arial;
color:White;
padding:3px;
position:relative;
z-index: 9999;
width:125px;
text-align:center;
}
Menu Code :
<asp:SiteMapDataSource ID="srcSiteMap" Runat="server" ShowStartingNode="false" />
Site Map Code :
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode
url="~/Default.aspx"
title="Home"
description="The home page of the Website">
<!-- SiteMapPath Nodes -->
<siteMapNode
title="Home"
description="Home">
</siteMapNode>
<!-- Menu Nodes -->
<siteMapNode
title="What we do"
description="Group of companies">
<siteMapNode
url="~/UsingMenu/MenuSiteMap.aspx"
title="ADMG logo"
description="Abu Dhabi Marketing Group" />
<siteMapNode
url="~/UsingMenu/MenuSiteMap.aspx111"
title="JamalMedia Logo"
description="Jamal Media" />
<siteMapNode
url="Images/images/Emirates Palace.jpg"
title="AFKARsoft Logo"
description="AFKARsoft"/>
</siteMapNode>
<!-- TreeView Nodes -->
<siteMapNode
title="Portfolio"
url=""
description="">
</siteMapNode>
<siteMapNode
title="Download"
description="">
</siteMapNode>
<siteMapNode
title="News Blog"
description="">
</siteMapNode>
<siteMapNode
title="About Us"
description="">
</siteMapNode>
<siteMapNode
title="Awards"
description="">
</siteMapNode>
<siteMapNode
title="Contact Us"
description="">
</siteMapNode>
</siteMapNode>
</siteMap>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是该图像的萤火虫结果。
我用谷歌搜索了这个问题,发现一个博客有类似的情况,可能会帮助他的代码解决你的问题。
在 asp.net 菜单控件中添加鼠标悬停在图像上
将自定义图标添加到特定菜单项
this is the firebug result for that image .
i googled around for this problem and i find a blog which have similar situation and might help his code to solve your problem.
Adding mouse over image in asp.net menu control
add custom icon to specific menu item
该图像作为资源嵌入到 DLL 文件中。您必须更改该资源中的图像。但我认为微软必须有一个属性来让你更改该图像并用你自己的图像覆盖它。
That image is embedded inside a DLL file as a resource. You have to change the image in that resource. But I think Microsoft must have a property to let you change that image and override it with your own image.
我建议你获取 firefox 的 firebug 插件并检查箭头图标(安装插件后右键单击),你会在 img src 中找到它的文件路径。然后您可以通过谷歌搜索合适的向下箭头并将其上传到您通过检查元素找到的路径!
编辑
刚刚注意到它是一个奇怪的网络资源路径!我想您必须查看一下您的网络服务器,应该不会太难找到:)
或者
使用 XML 通过 XSLT 制作您自己的菜单,然后您可以完全控制其布局等:)
I suggest you get firebug addon for firefox and inspect the arrow icon (right click when addon installed), you will find its file path in the img src. then you can google for a suitable down arrow and upload this to the path you found from inspecting the element!
EDIT
just noticed its a odd web resource path ! guess you will have to have a look on your webserver shouldnt be too hard to find :)
Alternative
use the XML to make your own menu with XSLT then you can have full controll over its layout ect :)