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

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - 沧海依粟

关于笔记本的CPU和显卡 5460 Ubuntu Server 安装 WordPress MU 时遇到的问题总结 PPM眼中合格的程序员,欢迎大家添加自己的看法 hi, Provence! Google的Picasa相册提供Blog嵌入功能 几个著名的Windows “伪”优化技巧 快来看看 WindowsVista中的新增命令 前几天在群里看到的很牛的关于Spring的一些介绍了...太牛8了... 香港回归十周年,纪念下. - 沧海依粟 呵呵,今天下了新版的Live Writer..插个地图玩下! - 沧海依粟 在IE中像迅雷那样通过右击链接打开程序 - 沧海依粟 第一贴:恭喜 - 沧海依粟 使用Firebug修改博客的样式(皮肤),并让Google Adsence美观的放在网页的顶端 - 沧海依粟 P2P的超简单例子,仅做纪念. - 沧海依粟 Outlook Express 后继有人啦!!Windows Live Mail Beta介绍. - 沧海依粟 域名DNS解析过程及原理 - 沧海依粟 世界上最乖的狗 - 沧海依粟 Vista下安装Adobe Reader 8.0(中文版)出错的解决办法 - 沧海依粟
针对IE6,IE7,Firefox设置不同的CSS
沧海依粟 · 2007-09-03 · via 博客园 - 沧海依粟

        From: http://www.sunsvn.com/?p=23

        今天到IE6下查看了我做得一个WordPress皮肤,发现页面有点变型,而IE7和Firefox却没有任何问题.找了小半天,才明白原来是IE6和IE7,Firefox对Padding的渲染方式不一样(太久没有做页面了,有点小辛苦的说),想了想用 !important 来hack,可是有个小问题,就是IE7现在已经能够对!important进行正式的解释了.而我,只是想对IE6进行特别的样式设置.

  试了很久,没有成功,只好求助于Google.发现如下一篇文章:http://bbs.bo-blog.com/viewthread.php?tid=4199.文中提到了如下方法:

#menu {  padding-right: 150px }/* Moz Firefox */
* html #menu { padding-right: 50px; } /* IE6 */
*+html #menu { padding-right: 150px; }/* IE7*/

   第一行是对针对 Moz Firefox 的设置(其实是针对所有浏览器的设置),第二行是针对IE6的设置,也就是说这一行只有IE6才能理解,最后一行是对IE7的设置.这样,我们就可以针对不同的浏览器,设置不同的样式了,哎,避免浏览器版本不同给我们造成的麻烦:)

  希望Web标准快点普及,这样做Web程序也不用这么辛苦啊.