兼容ie背景图片拉伸,实现图片填充

兼容ie背景图片拉伸


实现图片填充
兼容IE及所有浏览器的背景图片填充

    background: url(../images/test01.png) no-repeat center;
    width: 96px;
    height: 60px;               
    -moz-background-size: 100% 100%; 
    -o-background-size: 100% 100%; 
    -webkit-background-size: 100% 100%; 
    background-size: 100% 100%; 
    -moz-border-image: url(../images/tkbc.png) 0;                  
    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/test01.png,sizingMethod='scale';
    -ms-filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/test01.png',sizingMethod='scale');

IE中的 filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’../images/test01.png,sizingMethod=’scale’;
等于
css3中的 background-size: 100% 100%;

猜你喜欢

转载自blog.csdn.net/zshsats/article/details/80108005