发现一个IE6下很奇怪的问题,谁有兴趣来看下。
时间:2011-01-18
来源:互联网
<!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=gb2312" /> <title>无标题文档</title> <style type="text/css"> *{ padding::0; margin:0;} .v_caption{text-align:center; overflow:hidden;zoom:1;} .highlight_tip span{background:url(../img/icon14.png) no-repeat; width:9px; height:9px; display:inline-block;margin: 7px 3px 0;cursor:pointer;} .highlight_tip .current{ background:url(../img/icon13.png) no-repeat;} .prev,.next{ display:block; width:80px; height:26px; cursor:pointer;} .prev{ float:left;} .next{ float:right;} </style> </head> <body> <div class="v_caption"><span class="prev" > </span><span class="next"> </span> <div class="highlight_tip"> <span class="current">1</span><span>2</span><span>3</span><span>4</span> </div> </div> </body> </html>
提示:您可以先修改部分代码再运行
在IE6下prev,next两边如果没定背景色的话,定了宽度就没有用。我用绝对定位还是一样。太奇怪了。嘿嘿。提示:您可以先修改部分代码再运行
你给.prev,.next定个背景色,宽度就出来了。
[ 本帖最后由 hemin007 于 2011-1-18 10:03 编辑 ]
作者: hemin007 发布时间: 2011-01-18
不是width失效,是被.highlight_tip 挡住了
<!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=gb2312" /> <title>无标题文档</title> <style type="text/css"> *{ padding::0; margin:0;} .v_caption{text-align:center; overflow:hidden;zoom:1; height:26px;} .highlight_tip{margin:0 80px;} .highlight_tip span{background:url(../img/icon14.png) no-repeat; width:9px; height:9px; display:inline-block;margin: 7px 3px 0;cursor:pointer;} .highlight_tip .current{ background:url(../img/icon13.png) no-repeat;} .prev,.next{width:80px; height:26px; cursor:pointer;} .prev{ float:left;} .next{ float:right; background:red;} </style> </head> <body> <div class="v_caption"><div class="prev" >111111</div><div class="next">111</div> <div class="highlight_tip"> <span class="current">1</span><span>2</span><span>3</span><span>4</span> </div> </div> </body> </html>
提示:您可以先修改部分代码再运行
换个方法,定位也是可以的,需要注意的是highlight_tip层级要低于prev和next提示:您可以先修改部分代码再运行
<!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=gb2312" /> <title>无标题文档</title> <style type="text/css"> *{ padding::0; margin:0;} .v_caption{text-align:center; overflow:hidden;zoom:1;} .highlight_tip{position:relative;z-index:1;} .highlight_tip span{background:url(../img/icon14.png) no-repeat; width:9px; height:9px; display:inline-block;margin: 7px 3px 0;cursor:pointer;} .highlight_tip .current{ background:url(../img/icon13.png) no-repeat;} .prev,.next{ display:block; width:80px; height:26px; cursor:pointer;} .prev{position:absolute; left:0;z-index:2;} .next{ position:absolute; top:0;z-index:2;} </style> </head> <body> <div class="v_caption"><span class="prev" > </span><span class="next"> </span> <div class="highlight_tip"> <span class="current">1</span><span>2</span><span>3</span><span>4</span> </div> </div> </body> </html>
提示:您可以先修改部分代码再运行
[ 本帖最后由 redsky1987 于 2011-1-18 10:29 编辑 ] 提示:您可以先修改部分代码再运行
作者: redsky1987 发布时间: 2011-01-18
谢谢楼上的啊。
.highlight_tip,和.prev,.next加背景色后,就发现没有什么层次问题。
不加背景色呢,又出现上下层次问题。IE6确实很变态。
让我想起了当年写的自适应菜单和分页。这个只是左右两边加了div而已
[ 本帖最后由 hemin007 于 2011-1-18 10:45 编辑 ]
.highlight_tip,和.prev,.next加背景色后,就发现没有什么层次问题。
不加背景色呢,又出现上下层次问题。IE6确实很变态。
让我想起了当年写的自适应菜单和分页。这个只是左右两边加了div而已
[ 本帖最后由 hemin007 于 2011-1-18 10:45 编辑 ]
作者: hemin007 发布时间: 2011-01-18
你的意思是 絕對定位的情況下沒有背景的A鏈接,鼠標作用域不正常?
作者: gogoman 发布时间: 2011-01-18
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28