简体   繁体   English

为SharePoint 2010修改现成的CSS

[英]Modifying out of the box CSS for Sharepoint 2010

So i'm adding Bootstrap to my Sharepoint 2010 site. 所以我要在我的Sharepoint 2010网站上添加Bootstrap。 I'm dealing with the issues as they come but one thing I can't find any information on is what class the 'hover' and 'active' class is being used for the Global Navigation. 我正在处理即将出现的问题,但是我找不到任何信息的是“悬停”和“活动”类正在用于“全球导航”类。 I've attached a picture so you can see what i'm trying to fix. 我附了一张图片,这样您就可以看到我要解决的问题。 You can see on the second nav bar in the picture, the "transparent box" around the button isn't extending to the bottom of the navigation element. 您可以在图片的第二个导航栏上看到,按钮周围的“透明框”没有延伸到导航元素的底部。 I can't find the class that controls this so I can fix it. 我找不到控制该类的类,因此可以对其进行修复。

在此处输入图片说明

的css类应该是: .ms-siteactionsmenuhover

I actually figured it out, for me, the ID's are s4-ribbonrow and zz17_TopNavigationMenuV4 . 我实际上已经弄清楚了,对我来说,ID是s4-ribbonrow和zz17_TopNavigationMenuV4。 I had to change the hover,focus,and active properties. 我必须更改悬停,焦点和活动属性。

#s4-ribbonrow a:hover,
#s4-ribbonrow a:focus,
#s4-ribbonrow a:active,
#zz17_TopNavigationMenuV4 a:hover,
#zz17_TopNavigationMenuV4 a:focus,
#zz17_TopNavigationMenuV4 a:active {
    text-decoration: none;
}


#s4-ribbonrow *,
#s4-ribbonrow *:before,
#s4-ribbonrow *:after,
#zz17_TopNavigationMenuV4 *,
#zz17_TopNavigationMenuV4 *:before,
#zz17_TopNavigationMenuV4 *:after,
*[class*='ms-core-menu'],
*[class*='ms-dlg'],
*[class*='ms-dlg']:before,
*[class*='ms-dlg']:after,
*[class*='ms-cui'],
*[class*='ms-cui']:before,
*[class*='ms-cui']:after,
*[class*='ms-cui'] *,
*[class*='ms-cui'] *:before,
*[class*='ms-cui'] *:after,
*[class*='ms-dlg'] *,
*[class*='ms-dlg'] *:before,
*[class*='ms-dlg'] *:after,
*[class*='ms-webpart'] * {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM