识别Web部件名称以为其编写CSS的最简单方法是什么? [英] What is easiest way to identify name of web part to write CSS for it?

查看:88
本文介绍了识别Web部件名称以为其编写CSS的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须为Web部件编写一些CSS.我在其中一些中看到一个框,上面写着您可以为该Web部件编写CSS,但是由于我没有顶级管理员,我们的版本没有此功能,因此我必须编写CSS并将其放入 脚本Web部件.

I have to write some CSS for a web part.  I've seen in some of them they have a box where it says you can write CSS for this web part but because I do not have top level admin our version does not have this so I have to write the CSS and put it into the script web part.

但是由于某些原因,在使用Google inspect查看页面时,我总是很难找到Web部件的名称.

But for some reason I always have a hard time finding the web part name when looking at the page with Google inspect.

谢谢.

推荐答案

您是说要获得"div"提示吗? Web部件的名称框?

Do you mean that you want to get the "div" box of the web part by name?

我们可以使用jQuery来实现它,如下所示.

We can use jQuery to achieve it as below.


(.s4-wpcell-plain.ms-webpartzone-cell.ms-webpart-cell-vertical-inline-table:contains(' Web部件名称')'');
(".s4-wpcell-plain.ms-webpartzone-cell.ms-webpart-cell-vertical-inline-table:contains('Web part name')");

屏幕截图:

最诚挚的问候,

李刘


这篇关于识别Web部件名称以为其编写CSS的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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