0
在SharePoint 2013中,我試圖包含對一個額外的CSS文件的引用,但沒有得到這個工作。以下是我遵循的過程:在主頁面Sharepoint 2013 css參考
- 複製西雅圖母版頁並重命名它,上載它。
- 確信新的母版頁是網站母版頁通過接口
- 加載我的CSS文件的樣式庫
- 添加到該樣式庫的引用到母版頁和
我知道CSS在我將其粘貼到頁面上的腳本編輯器中時可以工作,但當然我不想在每個頁面上都這樣做。但提及它顯然不起作用。以下是我根據各種網站嘗試過的版本。第一行始終開啓:
<SharePoint:CssRegistration ID="CssRegistration1" Name="Themable/corev15.css" runat="server" />
根據網上的各種文章,一次嘗試這些其他行。沒有工作。
<SharePoint:CssRegistration ID="CssRegistration2" Name="<% $SPUrl:~SiteCollection/Style Library/CustomCSS_OAMC.css %>" After="corev15.css" runat="server" />
<SharePoint:CssRegistration ID="CssRegistration3" name="<% $SPUrl:~sitecollection/Style Library/CustomCSS_OAMC.css %>" runat="server" />
<SharePoint:CssRegistration ID="CssRegistration4" Name="<% $SPUrl:~SiteCollection/Style Library/CustomCSS_OAMC.css%>" runat="server" />
我的樣式表的代碼如下供參考」
<style type="text/css">
#sideNavBox { display: none; }
#contentBox { margin-left: 20px; }
#topNav { margin-top: 50px; }
#siteIcon { height: 100px; }
.ms-siteicon-img {
max-height: 200px;
max-width: 500px; }
#s4-bodyContainer #titleAreaBox.ms-table, #s4-bodyContainer #titleAreaBox >
#titleAreaRow {display:block;}
#s4-bodyContainer #titleAreaBox > #titleAreaRow > #siteIcon
{float:left;display:block;margin:0 auto;}
</style>