为什么我不能在sharepoint 2010中创建CSS渐变背景?

时间:2017-05-25 00:30:46

标签: html css sharepoint sharepoint-2010

我正在尝试在我在Sharepoint 2010中制作的页面中为div添加渐变背景。当我编辑html源代码并预览页面时,下面的代码工作正常,但是一旦我点击了Save &安培;左上角的关闭按钮,渐变消失。 sharepoint 2010不允许渐变吗?

<style>
#gradientBanner {
 background: white; /* For browsers that do not support gradients */
 background: -webkit-linear-gradient(left, #AFD3FA, #E3F9FF); /* For Safari 5.1 to 6.0 */
 background: -o-linear-gradient(right, #AFD3FA, #E3F9FF); /* For Opera 11.1 to 12.0 */
 background: -moz-linear-gradient(right, #AFD3FA, #E3F9FF); /* For Firefox 3.6 to 15 */
 background: linear-gradient(to right, #AFD3FA, #E3F9FF) !important; /* Standard syntax */
}
</style>


<div id="gradientBanner" style="width: 100%; height: 160px; ">

<div style="width:420px; display: inline-block; position:absolute; left:1px;">
<p style="font-family:cordia new;font-size: 36px; color:#547FAB; vertical-align: middle; padding-top: 21px; padding-left:30px;">PAYROLL LEADERSHIP TEAM</p>
</div>

<img src="/wg/PayrollLeadershipTeam/Images1/PuzzleBuildingBanner.png" alt="" style="position:absolute; right:23px; height: 160px; z-index:1;"/>

<div style="width: 100%; display: inline-block; position:relative; top:146px; height: 14px; background-color: #195E8A; z-index:0;">
</div>


</div>

<br/>
<br/>
<br/>

<div class="ms-rtestate-read ms-rte-wpbox" contenteditable="false">
<div class="ms-rtestate-notify  ms-rtestate-read 59faed79-5d0f-4684-b5f6-fd96080c5c8f" id="div_59faed79-5d0f-4684-b5f6-fd96080c5c8f">
</div><div class="ms-rtestate-read" id="vid_59faed79-5d0f-4684-b5f6-fd96080c5c8f" style="display: none;"></div></div>

1 个答案:

答案 0 :(得分:0)

没有;除非您使用脚本编辑器Web部件,否则SharePoint会删除所有脚本标记。