所以我對Sharepoint非常新,但我對HTML和CSS有足夠的經驗。我目前使這個迷你html應用程序來改變懸停超鏈接的一些圖片,並且如果我在普通瀏覽器/ sharepoint外部運行它,它工作正常。保存豐富的字段後,Microsoft Sharepoint在我的CSS中添加了「外部類」
現在的問題如下,我進入sharepoint,我寫我的代碼在豐富的領域(這使我可以選擇將html嵌入),它不起作用。它可以在「編輯模式」下工作,但不能在保存後使用。同樣在保存HTML代碼後,它會在每個CSS對象旁邊生成一個名爲「External class」的東西,如下所示。這就是我的代碼在保存後不工作的原因嗎? Sharepoint對我的HTML代碼做什麼?有沒有辦法來解決這個問題?我希望在這個問題上得到一些幫助。
原文:
<style type="text/css">
#map
{
width:663px;
height:715px;
background-image:url("/sites/00172/SiteAssets/Germany1-Standard.png");
}
#Bremen
{
position:absolute;
width:37px;
height:53px;
top:359px;
left:243px;
background-image:none;
}
#Berlin
{
position:absolute;
width:35px;
height:55px;
top:393px;
left:550px;
\t \t \t background-image:none;
}
#Coburg
{
position:absolute;
width:41px;
height:54px;
top:605px;
left:382px;
\t \t \t background-image:none;
}
#Hallstadt-Bamberg
{
position:absolute;
width:43px;
height:51px;
top:659px;
left:368px;
background-image:none;
}
#Bremen:hover
\t \t {
\t \t \t background-image:url("/sites/00172/SiteAssets/Germany1-Bremen.png");
\t \t }
\t \t
\t \t #Berlin:hover
\t \t {
\t \t \t background-image:url("/sites/00172/SiteAssets/Germany1-Berlin.png");
\t \t }
\t \t
\t \t #Coburg:hover
\t \t {
\t \t \t background-image:url("/sites/00172/SiteAssets/Germany1-Coburg.png");
\t \t }
\t \t
\t \t #Hallstadt-Bamberg:hover
\t \t {
\t \t \t background-image:url("/sites/00172/SiteAssets/Germany1-Hallstadt.png");
\t \t }
</style>
<div id="map">
<a href="/sites/00172/Lists/Calendar01/calendar.aspx" title="Bremen" id="Bremen">
<a href="/sites/00172/Lists/Calendar02/calendar.aspx" title="Berlin" id="Berlin">
<a href="/sites/00172/Lists/Calender03/calendar.aspx" title="Coburg" id="Coburg">
<a href="/sites/00172/Lists/Calendar04/calendar.aspx" title="Hallstadt-Bamberg" id="Hallstadt-Bamberg">
</div>
在Sharepoint保存後:
<style unselectable="on">
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #map {
width:663px;
height:715px;
}
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #Bremen {
position:absolute;
width:37px;
height:53px;
top:83px;
left:209px;
}
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #Berlin {
position:absolute;
width:35px;
height:55px;
top:118px;
left:516px;
}
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #Coburg {
position:absolute;
width:41px;
height:54px;
top:605px;
left:382px;
}
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #Hallstadt-Bamberg {
position:absolute;
width:43px;
height:51px;
top:209px;
left:83px;
}
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #Bremen:hover {
}
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #Berlin:hover {
}
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #Coburg:hover {
}
AFC97320FBA74F4E88F2B1AD1F833E02 .ExternalClass #Hallstadt-Bamberg:hover {
}
</style>
<div id="map" unselectable="on">
<a title="Bremen" id="Bremen" href="/sites/00172/Lists/Calendar01/calendar.aspx" unselectable="on">
</a><a title="Berlin" id="Berlin" href="/sites/00172/Lists/Calendar02/calendar.aspx" unselectable="on">
</a><a title="Coburg" id="Coburg" href="/sites/00172/Lists/Calendar03/calendar.aspx" unselectable="on">
</a><a title="Hallstadt-Bamberg" id="Hallstadt-Bamberg" href="/sites/00172/Lists/Calendar04/calendar.aspx" unselectable="on">
</a></div>