box-shadow IE8相容處理方法介紹

來源:互聯網
上載者:User
根據canisue(http://caniuse.com/#search=box-shadow),box-shadow相容性如所示:

測試代碼:

<!DOCTYPE html><html>    <head>        <meta charset="UTF-8">        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">        <title></title>        <style type="text/css">            * {                margin: 0;                padding: 0;            }                        #header {                width: 400px;                height: 400px;                margin: 10px;                background-color: #999999;                box-shadow: 3px 3px 5px #000;            }        </style>    </head>    <body>        <div id="header">        </div>    </body></html>

IE8瀏覽器效果:

border-radius在IE8瀏覽器安全色方案:

<!DOCTYPE html><html>    <head>        <meta charset="UTF-8">        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">        <title></title>        <style type="text/css">            * {                margin: 0;                padding: 0;            }                        #header {                width: 400px;                height: 400px;                margin: 10px;                background-color: #999999;                box-shadow: 3px 3px 5px #000;                /*關鍵屬性設定 需要把路徑設定好*/                behavior: url(PIE.htc);            }        </style>    </head>    <body>        <div id="header">        </div>    </body></html>

IE8瀏覽器下效果:

PIE可以處理CSS3的一些屬性,如:

相關文章

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.