+ -
当前位置:首页 → 问答吧 → ie6下 浏览器窗口缩小时,背景图片被截断。求解决方法?

ie6下 浏览器窗口缩小时,背景图片被截断。求解决方法?

时间:2011-07-19

来源:互联网

ie6下,浏览器窗口缩小时,放在容器宽度为100%的背景图片被截断(无论是平铺的背景图,还是整张的图片),而放在body里的背景图片,并不会出现此现象)。求解决方法?(ie8,ff也出现这现象,已修复。ie7暂找不到方法)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> *{margin:0;padding:0;} body{ width:100%; display:inline-table/*****修复ff,ie8*****/ } html{background:url();/*****修复ff****/ width:100% } div{ height:40px; background:url("http://s1.vipshop.com/static/images/comm/bg_head_women.png") no-repeat scroll center -130px transparent } </style> </head> <body> <div></div> <p style="background:#666; margin:0 auto; width:1000px"></p> </body> </html>
 提示:您可以先修改部分代码再运行

作者: twming   发布时间: 2011-07-19

浏览器现在还是不太稳定

作者: yh241   发布时间: 2011-07-19