CSS3 Pie工具可以讓IE6至IE8版本實現大多數的CSS3修飾特性,如圓角、陰影、漸層等

來源:互聯網
上載者:User

標籤:style   class   blog   code   ext   color   

css3 pie使用方法:

<!doctype html><html lang="en"><head>    <meta charset="UTF-8">    <title>Document</title>    <style>        .style{            border: 1px solid #669966; padding: 60px 0pt; text-align: center; width: 200px; font-size:18px; font-family:"sans-serif";                border-radius: 8px;                box-shadow: #666 0px 2px 3px;                 background: -webkit-gradient(linear, 0 0, 0 bottom, from(#EEFF99), to(#66EE33));                   background: -webkit-linear-gradient(#EEFF99, #66EE33);                   background: -moz-linear-gradient(#EEFF99, #66EE33);                 -pie-background: linear-gradient(#EEFF99, #66EE33);                 behavior: url(PIE.htc);                position:relative;                z-index:10;        }    </style></head><body>    <div class="style">css3 pie.htc DEMO</div></body></html>

特別提醒:

1、behavior的url裡一定要填寫htc檔案的絕對路徑(不管你用的是pie外掛程式還是別的htc檔案),因為 IE瀏覽器找該檔案是相對當前html檔案路徑來找的,所以對於Wordpress等動態程式產生的頁面一定要填寫絕對路徑。

2、一定要有定位屬性:position:relative;

3、因為在IE瀏覽器下這些CSS3效果的實現是要藉助於VML,由VML繪製圓角或是投影效果,所以還需要一個z-index屬性。z-index屬性最好設定得比較大,如2。

4、如果在IE瀏覽器下某些模組無法用此渲染,可以試著絕對位置相應的層,即加上“ width: 400px; height:400px;”屬性。

5、radius屬性的10px是圓角半徑,還可以給兩個值如“border-radius: 10px 5px;”,這樣則左上方與右下角半徑為10px,右上方與左下角半徑為5px。也可以賦4個值,為“上  右  下  左”。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.