IE8 下bootstrap的兼容问题

IE8不支持bootstrap栅格化布局,都用col-xs的列布局来实现。

css+div宽度在标签内部设置style属性修改

一些bootstrap中的样式在IE中不起效要在@media媒体查询不同分辨率中写出来

ie下响应式的宽度设置问题:

@media (min- 768px) {
    .container {
         750px;
    }
}
@media (min- 992px) {
    .container {
         970px;
    }
}
@media (min- 1200px) {
    .container {
         1170px;
    }
}

ie 8 不支持 :nth-child() 的写法,但是支持:first-child的写法,所以可以写为:

.div_title li:first-child {
	background: url(../img/tongdaoblue.png) no-repeat 33px 20px;
}
.div_title li:first-child:hover {
	background: url(../img/tongdaoor.png) no-repeat 33px 20px;
}
.div_title li:first-child+li {
	background: url(../img/jiuzhenblue.png) no-repeat 33px 20px;
}

设置边框,边框属性要分开写切边框颜色要用RGB格式

border-top-color: rgb(204,204,204); border-right-color: rgb(204,204,204); 
border-bottom-color: rgb(204,204,204); border-left-color: rgb(204,204,204); border-top- 1px; border-right- 1px; 
border-bottom- 1px; border-left- 1px; border-top-style: solid; border-right-style: solid;
border-bottom-style: solid; border-left-style: solid;box-sizing: border-box;

图片居中display:table-cell;vertical-align: middle

圆角和盒子阴影在ie8下不支持,要引入pie.htc文件

background不支持连写,要分开写

如果使用下拉菜单组件,背景颜色不能设置为透明,否则二级菜单点不到。

背景图不能平铺,在ps中设置相对应的宽高,

关于css固定底部且不跟着网页滚动

当电脑像素超过图片的宽度时,用:

filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../upload/lvimg/22.png', sizingMethod='scale');

src路径要和background的 url路径一致。

清除浮动.clearFix:after,.clearFix类名加到所有需要清除浮动的父级元素即可

.clearFix:after,.clearFix:before {content: "";display: block;clear: both;}
原文地址:https://www.cnblogs.com/cyapi/p/14202978.html