惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
H
Heimdal Security Blog
K
Kaspersky official blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Schneier on Security
G
GRAHAM CLULEY
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CERT Recently Published Vulnerability Notes
Google DeepMind News
Google DeepMind News
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
阮一峰的网络日志
阮一峰的网络日志
Simon Willison's Weblog
Simon Willison's Weblog
C
Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
Security Archives - TechRepublic
Security Archives - TechRepublic
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 司徒正美
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
V
Visual Studio Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Jina AI
Jina AI
P
Proofpoint News Feed
P
Proofpoint News Feed
有赞技术团队
有赞技术团队
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog
IT之家
IT之家
S
Security Affairs
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
N
News | PayPal Newsroom
Cloudbric
Cloudbric
AWS News Blog
AWS News Blog
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
NISL@THU
NISL@THU

博客园 - ゞ智者.千虑

获取 Google PR 值 ASP(vbs)版 (使用最新算法) Adobe CS4 Design Premium 简体中文正式版全集 提供种子文件 破解方法 jQuery1.4 API 中文版手册(chm格式) ASCII码表 解决在IE7下Ext表单(form)过长的时候fieldset内组件错位的BUG jQuery1.3 API 中文版手册(chm格式) FCKeditor的fckconfig.js配置 中文说明 - ゞ智者.千虑 - 博客园 关于Ext ComboBox组件的expand()方法 - ゞ智者.千虑 - 博客园 Adobe DreamweaverCS4 beta 下载地址+序列号+中文包+破解 全攻略o(∩_∩)o... 清除浮动的最优方法 Adobe DreamweaverCS4 beta+可用序列号,FireworkCS4 beta及SoundboothCS4 beta 官方下载地址 Dreamweaver CS4 Prerelease 关于远程桌面与本地计算机之间的复制、粘贴 IE6/IE7/FF CSS HACK jQuery 1.2 cheatsheet IE6.0图片下空隙问题解决方法集合 关于IIS 7.0 局域网无法访问的解决方法 China VS USA [转]ajax:拥抱json,让xml走开
关于IE6处理块级元素内部的问题 - ゞ智者.千虑 - 博客园
ゞ智者.千虑 · 2008-04-22 · via 博客园 - ゞ智者.千虑

目的:制作宽为300像素,高为2像素,边框为1像素的长方体(或者应该叫线)
出现的问题:用以下代码

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3<head>
 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5<title>无标题文档</title>
 6<style type="text/css">
 7<!--
 8
 9div {
10    background: #99FF99;
11    height: 2px;
12    border: 1px solid #FF0000;
13    line-height: 2px;
14    margin: 0px;
15    padding: 0px;
16    float: left;
17    width: 300px;
18}

19-->
20
</style>
21</head>
22
23<body>
24<div></div>
25</body>
26</html>

发现在IE6下无法实现高度为2像素,至少有10多像素的高,IE7和FF下则没问题,搞了半天都没弄明白是怎么回事,当然最后搞清楚了,把字体大小设为0px即可,如下代码:

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3<head>
 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5<title>无标题文档</title>
 6<style type="text/css">
 7<!--
 8
 9div {
10    background: #99FF99;
11    height: 2px;
12    border: 1px solid #FF0000;
13    line-height: 2px;
14    margin: 0px;
15    padding: 0px;
16    float: left;
17    width: 300px;
18    font-size: 0px;
19}

20-->
21
</style>
22</head>
23
24<body>
25<div></div>
26</body>
27</html>

希望对有同样困扰的朋友有所帮助...