当前位置: 代码迷 >> Web前端 >> ie6上的body:background图片在iframe里不能裸奔
  详细解决方案

ie6上的body:background图片在iframe里不能裸奔

热度:98   发布时间:2012-09-27 11:11:17.0
ie6下的body:background图片在iframe里不能裸奔

和一个购物网站合作,我们的页面嵌入他们的网站以作推广:

<frameset rows="66,*" frameborder="no" border="0" framespacing="0">
      <frame src="top.jsp" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
      <frame src="http://www.9dadao.com/" name="mainFrame" id="mainFrame" title="mainFrame" />
    </frameset>


发现九道嵌入进来以后,在ie6下出现了花屏的情况:


于是逐个排除,最后找到问题出现在:
body{font-size:12px;color:#000; background:url(../images/gwc_bg.gif) repeat-x left top;font-family:"simsun","宋体",Arial,sans-serif;}


给背景加了个默认颜色,于是问题解决了。
body{font-size:12px;color:#000; background:url(../images/gwc_bg.gif) repeat-x left top #fff;font-family:"simsun","宋体",Arial,sans-serif;}


原因:未知,ie6脾气古怪。
  相关解决方案