IE兼容6,7,8版本盒子陰影寫法

<html>
    <head>
        <meta charset="UTF-8" />        
        <style type="text/css">
            .wrap {
                position: relative;                
            }
            /* 覆蓋陰影部分 */
            .shadow {
                width: 200px;
                height: 100px;
                background: #fff;                    
            }
            /* 陰影背景部分 */
            .ieShadow {
                display: none;
                display: block\9;
                position: absolute;
                width: 200px;
                height: 100px;
                z-index: -1;
                background: #ccc;
                top: -5px;
                left: -5px;
                filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius='6', MakeShadow='true', ShadowOpacity='0.2');
            }
        </style>
    </head>
    <body>
        <div class="wrap">
            <div class='ieShadow'></div>
            <div class='shadow'></div>
        </div>
    </body>
</html>

css3 transform 縮寫是有順序的!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章