SharePoint 2010 ASP:菜单控件和我自己的基于 UI 和 UL 标记的 CSS

发布于 2024-12-15 06:58:58 字数 837 浏览 0 评论 0原文

我使用 CSS3 生成器生成了一个很酷的 css,并获取了它的 CSS 样式文件,如下所示。粘贴了一个简短的版本,虽然 css 很长...

ul#css3menu,ul#css3menu ul{
margin:0;list-style:none;background-color:#C0C0C0;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABsCAYAAACrf9gNAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oFEgYCO8oxcpkAAABlSURBVCjPjZA7CoBADETfTnIB739GGysLIRaCsiGRbYYJ+fAyAJsACRgCrHN6XSU+j3jR8N8N68okwyLiEHC9cn6OiHAmcOvQVJC2zNULLX3KTwL2uWwjVnfZFz9aiDiFk1geyBuO2g6m9q0GQQAAAABJRU5ErkJggg==");background-repeat:repeat;border-width:0px;border-style:solid;border-color:#999999;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;}

现在我想知道如何将其与 ASP:Menu 控件合并,该控件使用“s4-tn”类并且具有完全不同的 CSS 集...并且我也使用站点地图作为数据源。我可以删除这个css并在sharepoint的asp:menu控件中的某个地方引用它并像css3一样转换菜单样式吗?

谢谢

I have generated a cool css using CSS3 generator and took its CSS style file which looks something like this. pasted a short version though the css is long...

ul#css3menu,ul#css3menu ul{
margin:0;list-style:none;background-color:#C0C0C0;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABsCAYAAACrf9gNAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oFEgYCO8oxcpkAAABlSURBVCjPjZA7CoBADETfTnIB739GGysLIRaCsiGRbYYJ+fAyAJsACRgCrHN6XSU+j3jR8N8N68okwyLiEHC9cn6OiHAmcOvQVJC2zNULLX3KTwL2uWwjVnfZFz9aiDiFk1geyBuO2g6m9q0GQQAAAABJRU5ErkJggg==");background-repeat:repeat;border-width:0px;border-style:solid;border-color:#999999;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;}

now i want to know how to incorporate this with ASP:Menu control which uses "s4-tn" class and have entirely different set of CSS...and I am using sitemap also as datasource. Can I just drop this css and reference it somewhere in asp:menu control of sharepoint and convert the menu style like css3?

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅语花开 2024-12-22 06:58:58

要为菜单使用不同的 CSS 类名,您需要编辑母版页并修改菜单控件属性。以下是您要查找的控件:

<SharePoint:AspMenu ID="TopNavigationMenuV4" CssClass="css3menu"...

MSDN 上的更多信息: http://msdn .microsoft.com/en-us/library/ms476607.aspx

To use a different CSS classname for the menu, you'll need to edit your masterpage and modify the menu control properties. Here's the control you're looking for:

<SharePoint:AspMenu ID="TopNavigationMenuV4" CssClass="css3menu"...

More info on MSDN: http://msdn.microsoft.com/en-us/library/ms476607.aspx

自在安然 2024-12-22 06:58:58

在控件中不要忘记在母版页后注册以覆盖规则

 <SharePoint:CssRegistration name="custom.css" After="corev4.css"

in the control do not forget to register after the master page to override the rules

 <SharePoint:CssRegistration name="custom.css" After="corev4.css"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文