第一篇、自訂部落格園的css樣式並讓其支援響應式

來源:互聯網
上載者:User

標籤:

css檔案:

<style type="text/css">    #cnblogs_post_body    {        color: black;        font: 0.875em/1.5em "微軟雅黑" , "PTSans" , "Arial" ,sans-serif;        font-size: 16px;    }    #cnblogs_post_body h1    {        background: #2B6695;        border-radius: 6px 6px 6px 6px;        box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);        color: #FFFFFF;        font-family: "微軟雅黑" , "宋體" , "黑體" ,Arial;        font-size: 17px;        font-weight: bold;        height: 25px;        line-height: 25px;        margin: 15px 0 !important;        padding: 5px 0 5px 20px;        text-shadow: 2px 2px 3px #222222;    }@media screen and (min-width: 1px) and (max-width: 800px)    {        #mytopmenu        {            margin-left: 0;            margin-right: 0;            width: 100%;        }        #centercontent        {            padding-left: 0;            padding-right: 0;            width: 100%;        }        #leftcontent        {            width: 100%;            position: static;            width: 100%;        }        #footer        {            margin: 0;            width: 100%;        }        #comment_form        {            display: none;        }        #header        {            display: none;        }        #green_channel        {            display: none;        }        #centercontent img { width: 98% !important; }    }</style>

 

頁首代碼:

<script type="text/javascript">var meta = document.createElement(‘meta‘);meta.setAttribute(‘name‘, ‘viewport‘);meta.setAttribute(‘content‘, ‘initialwidth=device-width,initial-scale=1‘);document.getElementsByTagName(‘head‘)[0].appendChild(meta);</script>

 

第一篇、自訂部落格園的css樣式並讓其支援響應式

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.