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

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

博客园 - ゞ智者.千虑

获取 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>

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