실제 파일을 편집하지 않고 v4.master와 사용자 지정 CSS를 등록하는 방법
-
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