ie8中position不显示的问题

ie8中 position:relative定义的层不能正常显示

无意打开IETester在IE8下测试了一个页面,突然发现一个父级position:relative;子级position:absolute;的样式焦点轮播的时候在IE8下居然是错位的。仔细看了一下,发现IE8居然不认父级的相对定位,直接就是在屏幕上显示绝对定位。

在我的系统中IE6,IE7下显示正常,解决办法

<meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
改成

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

或者直接在原

<meta http-equiv="Content-Type" content="text/html; charset=GBK"/>下面加上

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

通过以上方式修复您的网站后,将强制 Windows Internet Explorer 8 以类似 Windows Internet Explorer 7 呈现页面的方式来呈现页面。

posted @ 2014-02-19 10:09  jiaojiao085  阅读(217)  评论(0编辑  收藏  举报