SharePoint Content Editor无法正确显示页面

时间:2017-03-03 13:59:23

标签: css content-management-system sharepoint-2013

我使用HTML和
建立了一个页面             CSS。
           当我带来IE浏览器它显示正常。但是,当我链接到它           内容编辑器中的内容链接可以清除所有格式          并且显示奇怪(如图所示)。救命!试着把它放进去 iframe,但无法让它发挥作用。 SharePoint是否强制它拥有自己的CSS           到页面?我该如何阻止它?

以下是代码,我需要知道在哪里添加代码来破坏SharePoint CSS。

    [1]: https://i.stack.imgur.com/l0jxu.png


    <script type="text/javascript">



    $.extend({
    getUrlVars: function(){
     var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?')   
    +     1).split('&');
    for(var i = 0; i < hashes.length; i++)
     {
      hash = hashes[i].split('=');
      vars.push(hash[0]);
      vars[hash[0]] = hash[1];
     }
     return vars;
     },
      getUrlVar: function(name){
      return $.getUrlVars()[name];
    }
    });

   $(document).ready(function(){

    var byName = $.getUrlVar('IsDlg');
    if(byName == '1') {
    $('DIV[id="s4-leftpanel"]').hide();
    };
    });
    </script><html xmlns:mso="urn:schemas-microsoft-com:office:office"   
    xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>

    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:_dlc_DocId msdt:dt="string">GENIE4-597-583</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">6dfabe3c-9859-478a-8fe7- 
     de9184827a8c</mso:_dlc_DocIdItemGuid>

     <mso:_dlc_DocIdUrl  
     msdt:dt="string">http://genie.norgine.com/IT/_layouts/DocIdRedir.aspx? 
     ID=GENIE4-597-583, GENIE4-597-583</mso:_dlc_DocIdUrl>

     </mso:CustomDocumentProperties>
     </xml><![endif]-->
      <title></title></head>
       <body>



       <style>



     .main {
      margin: 0 auto ;
     max-width: 2000px;
    }

     .wrapper {

      box-sizing: border-box;
      background: #ffffff;

      }
     .box {
      width: 171px;
      height: 152px;
      margin: 2px;
      display: inline-block;
      vertical-align: top;
      float: left;
        }
      .topicImage{
      width: 302px;
     height: 152px;
     margin: 2px;
     float: left;
    }

    a:link {
    text-decoration: none;
    }

    </style>


     <div class="main" style="width:90%">
     <div class="topicImage"><img srcxxx.png" alt="Helpful information on  
     how 
     to manage and reset your   
     network password" alt="IT Services"> </div>
     <div>
      <div class="wrapper">
      <div class="PageContentStyleCustom"><div class="box"><a 
       href="/xxx.aspx">  <img style="border:0;"   
       src="/xxx.png" 
       alt="Helpful information on how to manage and reset your network 
         password"></div><!--
         --><div class="PageContentStyleCustom"><div class="box"><a 
        href="/xxx.aspx"> <img style="border:0;" 
        srcxxx" alt="Helpful  
       information on how to access/manage your email account, how to  
      identify 
        and block unwanted email"></div><!--
          --><div class="PageContentStyleCustom"><div class="box"><a 
        hrefxxx.aspx"> <img style="border:0;"  
        srcxxx.png" alt="Overview 
        of the rules on website restrictions and how to request access 
      to    
       blocked site"></div><!--
       --><div class="box"><a href="/xxx.aspx">  
        <img style="border:0;"srcxxx.png" alt="Click here for tips and 
      hints on 
       how to use Skype for Business"></div><!--
         --><div class="box"><a href="xxx.pdf"><img style="border:0;"src="" 
        alt="Information on joining the guest 
         WIFI"></div><!--
          --><div class="box">
        <a 
        href="xxx.qds"><img 
        style="border:0;"srcxxx.png"  
        alt="Click here to find and connect to a printer at your current 
         location"></div><!--              
          --><div class="box"><a hrefxxx.aspx"><img 
         style="border:0;"src="/xxx.png" alt="How to purchase Microsoft 
    Office 
     Professional at a discounted price"></div><!--
      --><div class="box"><a 
     href="xxx.hta">  <img 
     style="border:0;"src**xxx**.png" alt="Click there to update your  
     profile 
      information"></div></div>
        <a href="xxx/"><!--
          --><div class="box"><a 
         href="http:xxx/"><img 
          style="border:0;"src="/xxx" alt="Click here to manage and release 
         blocked emails"></div><!--
          --><div class="box"><a 
          href="http: xxx" ><img 
          style="border:0;"src="xxx.png" alt="Click here to raise a 
          request to create a new SharePoint site"></div><!--
           --><div class="box"><a href="xxx.aspx"><img style="border:0;"  
         srcxxx.PNG" alt=" "></div><!--
          --><div class="box"><a 

       href="http://xxx"></div><!--
        --><div class="box"><a href="xxx.pdf">  <img style="border:0;" src  
       xxx.png" alt="System register"></div><!--
       --><div class="box"><a hrefxxx.PNG" alt="Coming soon"></a></div>

     </div>
     </div>
     </div>

1 个答案:

答案 0 :(得分:0)

内容编辑器webpart的内容可能会受到页面样式的影响,因为SharePoint正在强制使用自己的CSS。

确保您不使用SharePoint类和/或为您的内容提供自己的类和样式

相关问题