在特定的SharePoint功能区栏按钮上应用CSS? [英] Apply CSS on a Specific SharePoint Ribbon Bar Button?

查看:99
本文介绍了在特定的SharePoint功能区栏按钮上应用CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以简单地隐藏特定的SharePoint功能区按钮?我已经看到了用于隐藏整个功能区栏的CSS代码,但是我只想在其上隐藏1个按钮(签入按钮).我尝试了几种引用方式,例如:

Is there a way to simply hide a particular SharePoint ribbon bar button? I've see the CSS code for hiding the entire ribbon bar, but I only want to hide 1 button on it (the check-in button). I've tried referencing it several ways, such as:

a#Ribbon.DocLibListForm.Edit.Commit.CheckIn-Large { display: none; !important }

ms-cui-ctl-large#Ribbon.DocLibListForm.Edit.Commit.CheckIn-Large { display: none; !important }

a.ms-cui-ctl-large#Ribbon.DocLibListForm.Edit.Commit.CheckIn-Large { display: none; !important }

我的CSS可能全错了,或者我正在以错误的方式进行操作.如何隐藏此元素?

It's possible that my CSS is just all wrong, or perhaps I'm going about it the wrong way. How can I hide this element?

推荐答案

诀窍在于,对于SharePoint ID中的任何'.'(不幸的是,它们的名称中都包含.,并且不可编辑),您必须在每个'\'之前加上'\'才能成为'\.',因此在原始示例中,您会发现:

The trick is that for any '.' within the SharePoint ID (Which do unfortuenately include . as part of their names and are non-editable) you need to preceed each with '\' to become '\.' so in your original example you'll find that:

#Ribbon\.DocLibListForm\.Edit\.Commit\.CheckIn-Large {display:none;}

像魅力一样工作! :-)

Works like a charm! :-)

这篇关于在特定的SharePoint功能区栏按钮上应用CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆