主站
经典论坛
家园
作品集
Think.Pages
维基
桌面
聚合
注册
登录
专长会员
帮助
客服QQ:6650171
经典论坛
»
WEB标准化专栏
» IE6下有这个距离,应该怎么调
‹‹ 上一主题
|
下一主题 ››
发新话题
发布投票
发布商品
发布悬赏
发布活动
发布辩论
发布视频
打印
[求助]
IE6下有这个距离,应该怎么调
wllxheb
[楼主]
冒冒
初级会员
帖子
72
体力
136
威望
0
当前
北京 海淀区
离线
1 天
个人网站
发短消息
作品 1
加为好友
1
#
大
中
小
发表于 2009-2-24 14:26
请教一下 我在IE6中出现了这个问题,鼠标滑过的时候色块与背景图没有连接上,调了半天,越调越晕
IE6是这样
希望能像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> <title> new document </title> <style type="text/css"> div#main_2{ width:100%; height:auto; background:#F1F0DA; } div#sv_banner{ width:825px; height:43px; padding:10px 0 0 0; margin-left:auto; margin-right:auto; } div#sv_banner ul{ width:823px; height:43px; background:url(http://i.namipan.com/files/a8f6aa59fad7e7422d5a769d0e009d049a849f6ea80500008f68/0/banner.jpg) no-repeat; } div#sv_banner ul li{ width:70px; height:43px; float:left; display:inline; margin:0 0 0 10px; padding:15px 0 0 0; font:bolder 14px 黑体; } div#sv_banner ul li a{ color:#000; text-decoration:none; display:block; } div#li_zzjs, div#li_mksj, div#li_gxdz{ width:70px; height:43px; } .banner1{ width:70px; margin-top:-15px; padding:15px 0 0 0; } div#green a:hover,div#green a:active{ background:#7AD232; height:28px; } div#orange a:hover,div#orange a:active{ background:#FE8109; height:28px; } div#blue a:hover,div#blue a:active{ background:#1EBDE7; height:28px; } </style> </head> <body> <div id="main_2"> <div id="sv_banner"> <ul> <li><div id="green" class="banner1"><a href="#">测试测试</a></div></li> <li><div id="orange" class="banner1"><a href="#">测试测试</a></div></li> <li><div id="blue" class="banner1"><a href="#">测试测试</a></div></li> </ul> </div> </div> </body> </html>
提示:您可以先修改部分代码再运行
[
本帖最后由 wllxheb 于 2009-2-24 14:52 编辑
]
Lightlasts
积分
136
阅读权限
20
性别
女
在线时间
128 小时
注册时间
2007-4-23
最后登录
2009-4-30
查看个人网站
查看详细资料
TOP
西部数码VPS主机1G内存仅266元
nanfengpiaoye
非桐不栖
初级会员
帖子
725
体力
178
威望
0
当前
北京 海淀区
个人空间
发短消息
加为好友
2
#
大
中
小
发表于 2009-2-24 14:55
<!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"> <!-- ul,li{ list-style: none; } li{ width: 300px; height: 109px; background: #ff00ff; margin: 0px; padding: 1px 0px 0px; } a{ display: block; width: 300px; height: 100px; background: #ff0000; margin-top: 10px; } a:hover{ display: block; width: 300px; height: 100px; background: #ff00ff; } --> </style> </head> <body> <ul><li><a href="#">测试</a></li></ul> </body> </html>
提示:您可以先修改部分代码再运行
积分
178
阅读权限
20
性别
女
在线时间
839 小时
注册时间
2005-9-28
最后登录
2009-4-30
查看详细资料
TOP
天业互联-酷睿租用599¥
wllxheb
[楼主]
冒冒
初级会员
帖子
72
体力
136
威望
0
当前
北京 海淀区
离线
1 天
个人网站
发短消息
作品 1
加为好友
3
#
大
中
小
发表于 2009-2-24 15:34
谢谢楼上的~~看来这部分我得重写了
Lightlasts
积分
136
阅读权限
20
性别
女
在线时间
128 小时
注册时间
2007-4-23
最后登录
2009-4-30
查看个人网站
查看详细资料
TOP
认证您的手机
,获得手机认证图标
手机认证的好处
wllxheb
[楼主]
冒冒
初级会员
帖子
72
体力
136
威望
0
当前
北京 海淀区
离线
1 天
个人网站
发短消息
作品 1
加为好友
4
#
大
中
小
发表于 2009-2-24 15:49
看一下效果:
<!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"> <!-- ul,li{ list-style: none; margin:0; } div{ margin:0; width: 300px; font:bolder 14px 黑体; background: url(http://i.namipan.com/files/a8f6aa59fad7e7422d5a769d0e009d049a849f6ea80500008f68/0/banner.jpg) no-repeat; } li{ padding-left: 10px; float:left; } .menu_a a{ display: block; width: 70px; height: 30px; padding-top: 10px; } .menu_a a:hover{ display: block; width: 70px; height: 30px; } #test1 a:hover{ background: #7AD232; } #test2 a:hover{ background: #FE8109; } #test3 a:hover{ background: #1EBDE7; } --> </style> </head> <body> <div> <ul> <li class="menu_a" id="test1"><a href="#">整站建设</a></li> <li class="menu_a" id="test2"><a href="#">模块设计 </a></li> <li class="menu_a" id="test3"><a href="#">自由定制</a></li> </ul> </div> </body> </html>
提示:您可以先修改部分代码再运行
[
本帖最后由 wllxheb 于 2009-2-24 15:51 编辑
]
Lightlasts
积分
136
阅读权限
20
性别
女
在线时间
128 小时
注册时间
2007-4-23
最后登录
2009-4-30
查看个人网站
查看详细资料
TOP
用CSS布局建站从零开始
|
CSS3新特性
|
Chrome源码剖析
‹‹ 上一主题
|
下一主题 ››
版块跳转
内部交流区
网站开发区
前台制作与脚本专栏
后台数据库编程
WEB标准化专栏
WAP 技术专栏
平面设计区
艺术与设计论坛
Adobe Photoshop 专栏
Fireworks 专栏
矢量图形专栏
插画手绘交流
交互设计区
用户体验综合版
UI图形设计
RIA设计与应用
Flash 专栏
Silverlight 专版
Director 专栏
其它技术讨论区
计算机技术
英语学习和技术翻译
摄影欣赏与技术交流
无线通讯与数码设备
信息平台
企业招聘
学习工作交流区
体育运动、线下活动与游戏
创业版
最近访问的版块
体育运动、线下活动与游戏
企业招聘
艺术与设计论坛
前台制作与脚本专栏
UI图形设计
Adobe Photoshop 专栏
摄影欣赏与技术交流
Blog view