Sharepoint Online 中的自定义 css 文件不会更新

发布于 2024-09-11 14:38:27 字数 345 浏览 5 评论 0原文

我正在 Sharepoint Online 中的 Intranet 上工作。我添加了一个自定义 css 文件并将其包含在母版页中默认样式表之后。在源代码中,我可以清楚地看到它,并且可以沿着路径找到其预期文件。

早些时候,我没有遇到任何问题,可以将其签出,在 Sharepoint 设计器中进行编辑,保存,然后签入,更改将应用​​到网站。

但现在我所做的改变似乎并没有被抓住。我已经清除了几个浏览器上的缓存,但仍然没有任何变化。

母版页和自定义起始页均已发布。没有文件被保留签出。

我可能是一个共享点菜鸟,我搜索了许多论坛,但没有找到与我的问题相关的任何内容。

有人能给我指出正确的方向吗? :)

I am working on an intranet in Sharepoint online. I have added a custom css file and included it in the masterpage, after the default stylesheets. In the sourcecode I can see it clearly and I can follow the path to its intended file.

Earlier I had no problems to check it out, edit in Sharepoint designer, save it, then checking it in and changes would apply to the site.

But now the changes I make don't seem to catch. I have cleared cache on several browsers but still no change.

The masterpage and the custom startpage are both published. No files are left checked out.

I may be a sharepoint noob, I have searched any number of forums but not found anything pertinent to my problem.

Can anyone give me a pointer in the right direction please?
:)

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

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

发布评论

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

评论(5

毁梦 2024-09-18 14:38:27

您是否将 CSS 文件保存在使用版本控制的文档库中?也许您忘记发布更改的最新版本,因此浏览器只能看到您以前的版本。

Do you save the CSS file in a document library that uses versioning? Perhaps you forgot to publish the latest version of your changes, so browsers only see your previous version.

御弟哥哥 2024-09-18 14:38:27

我专门创建了一个帐户来回复这篇文章,因为我遇到了同样的问题,并且发现您关于创建新 CSS 文件的更新有助于确定真正的问题。所以我想分享我的解决方案!

最后我发现是我们启用的 BLOB 缓存导致了问题。我们已使其能够使用图像再现。根据以下有关配置 BLOB 缓存的 technet 文章,我从文件类型中删除了 CSS,我们的问题得到了解决!
http://technet.microsoft.com /en-US/library/cc770229(v=office.15).aspx#BLOB

我希望这有帮助:)

I made an account specifically to respond to this post because I was having the same issue and found your update about creating a new CSS file helpful in determining the real issue. So I wanted to share my solution!

In the end I discovered it was our BLOB cache being enabled that was causing the issue. We had enabled it to use image renditions. As per the following technet article regarding configuring the BLOB cache, I removed CSS from the file types and our issue was resolved!
http://technet.microsoft.com/en-US/library/cc770229(v=office.15).aspx#BLOB

I hope this helps :)

时常饿 2024-09-18 14:38:27
  1. 您是否以网站集管理员身份登录?
  2. CTRL+F5 从服务器获取最新的 .css?
  3. 当您查看源代码时,您能够看到 .css 文件的链接吗?
  4. 当您点击 .css 文件的链接并打开 .css 文件时,它是否包含您最近所做的更改?

我认为您可能已经这样做了..但请确保在发布 .css 文件后它得到批准。

按 F12 加载 IE 开发工具栏以查看相关元素中使用的样式。可能您最近添加的类中有一个小的语法错误。

  • 谢谢,卡西克。
  1. You are logged in as the Site Collection administrator?
  2. CTRL+F5 to get the latest .css from server?
  3. When you View Source you are able to see the link to your .css file?
  4. When you follow the link to the .css file and open the .css file, it has the recent changes you made?

I think you might have done this.. but make sure after publishing the .css file it is approved.

Press F12 to load IE Dev Toolbar to see what styles are being used in the elements in question. May be you have a small syntax error in the recent classes you added.

  • Thanks, Karthik.
你没皮卡萌 2024-09-18 14:38:27

最后,我制作了 css 文件的副本,给它一个新名称并引用它,效果非常好。

感谢大家的回答和评论

In the end I made a copy of the css file, gave it a new name and referred to that instead, worked like a charm.

Thanks for your answers and comments all

享受孤独 2024-09-18 14:38:27

在“网站集管理”设置下,转到“SharePoint Designer”设置,并确保标记了所有复选框,包括“启用自定义母版页和页面布局”。

此外,请确保引用自定义 CSS 的标记位于标题中最后一个元标记的下方您的母版页。

最后,删除引号...还有使用 javascript 添加的其他引号,因此您不需要引号并且拥有样式表的完整 URL,否则它将无法工作!

Under Site Collection Administration settings, go to SharePoint Designer settings and make sure all the checkboxes are marked including "Enable Customizing Master Pages and Page Layouts "

Also, make sure your tag that cites your custom CSS is just below the last meta tag in the head of your master page.

Lastly, remove quotes... there are additional quotes added with javascript so you don't need quotes AND have the full URL to the stylesheet or it will not work!

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