実際のファイルを編集せずにカスタムCSSをv4.masterに登録する方法
-
10-12-2019 - |
質問
v4.masterでカスタムCSSを追加したいのですが、実際のマスターページ自体を編集したくないです。
アイデアは、WikiページにカスタムCSSをロードすることです。
それをやる方法はありますか?
解決
In addition to Eric's post
You can use also use ScriptLink
together with Custom action and inject your CSS into the ScriptLink
section of masterpage - All without editing a master page (see the sample below)
<CustomAction
Id="MyCustomCSSWiki"
Location="ScriptLink"
ScriptBlock="document.write('<link rel="stylesheet" After="Corev15.css" type="text/css" href="../_layouts/14/MyCustom/Styles/BrandingWiki.css"></' + 'link>');"
Sequence="202" />
他のヒント
If you don't want to modify the master page, then the alternative is to go into Site Settings and click on Master Page in the look and feel section and in there add your custom css file into the Alternate CSS URL section.
If you just want to add custom CSS to a specific page, then add a Content Editor web part and point that to your CSS file.
所属していません sharepoint.stackexchange