IE8兼容background-size
来源:互联网 发布:全球拍软件 编辑:程序博客网 时间:2024/04/29 08:30
因为background-size是CSS3的属性,所以IE8并不支持。
可以采用滤镜来支持,即
在IE不支持这个属性的时候可以通过滤镜来实现这样的一个效果。
代码如下:
<strong>background-image: url('file:///F:/test/images/flashbg.jpg');background-size: cover;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='file:///F:/test/images/flashbg.jpg', sizingMethod='scale');</strong>
这样就可以让IE也实现background-size:100%100%的效果了,注意这两个路径要一样,并且是绝对路径。
但是需要全路径。
也可以采用
backgroundsize.min.htc, 这个可以在https://github.com/louisremi/background-size-polyfill拷贝或者下载。
body { height: 100%; margin: 0; background: url(images/126.jpg) center no-repeat; background-size: cover; -ms-behavior: url(backgroundsize.min.htc); behavior: url(backgroundsize.min.htc);}
但是需要注意的是此处的background-size: cover;需要设置,而且不能用100% 100%等的样式。这样的样式是chrome与ie都兼容的。
0 0
- IE8兼容background-size
- background-size 兼容ie8
- background-size 兼容ie8
- background-size兼容IE8解决方案
- IE8兼容background-size属性
- IE8兼容background-size:cover
- background-size:cover兼容IE8的方法
- IE8支持background-size
- background-size兼容
- background-size兼容ie
- css背景图片填充样式background-size兼容ie8以下浏览器解决
- background-size兼容ie7/8
- background-size doesn't work in IE8
- ie7,ie8背景图片background-size无效问题
- css3 background-size:cover IE8不支持 解决办法
- ie8下兼容background-sizing方案
- css3 background-size属性--ie兼容
- ie9以下兼容background-size属性
- 人脸识别关键问题研究(光照、姿态)
- Spring的一些xml配置技巧
- 字符设备 register_chrdev_region()、alloc_chrdev_region() 和 register_chrdev()
- 大数据课程体系-学习笔记-第一阶段-Java Thread
- NGUI Localization的修改
- IE8兼容background-size
- SDWebImage 淡入淡出效果
- 创建app快捷方式
- ubuntu进行apt-get时候出现Package ssh is not available, but is referred to by another package 错误
- No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse
- 新浪笔试题
- as上签名文件在Android Studio中的.jks文件代替在eclipse时.keystore
- mac xos系统写程序出如下错: dyld: Library not loaded
- bat for循环