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

推荐订阅源

V
Visual Studio Blog
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
V
V2EX
博客园_首页
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
H
Help Net Security
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
云风的 BLOG
云风的 BLOG
D
Docker
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
N
News and Events Feed by Topic
Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
A
Arctic Wolf
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
aimingoo的专栏
aimingoo的专栏
Hacker News: Ask HN
Hacker News: Ask HN
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy International News Feed
T
Troy Hunt's Blog
T
Tenable Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Recorded Future
Recorded Future
F
Fortinet All Blogs
D
DataBreaches.Net
B
Blog
T
Threat Research - Cisco Blogs
MyScale Blog
MyScale Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
The GitHub Blog
The GitHub Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence

博客园 - ITAres

百度地图API详解之地图坐标系统 NTCPMSG 开源高性能TCP消息发送组件 jQuery验证控件jquery.validate.js使用说明+中文API WinDbg+SOS:Web服务器CPU(100%)实例分析 不错的 solr 使用安装介绍 stream.js :一个新的JavaScript数据结构 MongoDB学习笔记 MongoDB update操作文档 MongoDB查询的语法 TCP/IP传输层,你懂多少? 验证URL中GUID值是否重复的类库,防止用户直截刷URL(代码存在问题,一直没找到来。看有没有高人能看出来。) 浅谈Python Web的五大框架 Jquery css+xPath C#方向高级开发人员面试时应该事先考虑的问题 .NET垃圾回收机制 细数 Windows 平台上的 NoSQL 数据库 从 ASCII 到 UTF-8 : 大话编码 ASCII码表在线查询 - ITAres - 博客园 JDBC中操作数据库的三个对象:Statement;PreparedStatement;CallableStatement
div+css之盒子模型
ITAres · 2010-02-05 · via 博客园 - ITAres

ie系列采用的是微软自己的盒子模式,firefox采用的是标准的w3c盒子模型。


从上图可以看到 IE 盒子模型的范围也包括 margin、border、padding、content,和标准 W3C 盒子模型不同的是:IE 盒子模型的 content 部分包含了 border 和 padding。


从上图可以看到标准 W3C 盒子模型的范围包括 margin、border、padding、content,并且 content 部分不包含其他部分。

在实际的操作中可采用如下方法避免如上不同。

    Padding-left:40px;

    width:920px !important;//firefox

    width:960px;

2、 当好几个DIV层通过float:left和margin-left布局时,ie6中有bug,ie6默认会把第一个层的margin-left做双倍处理。

3、 当即可以用margin,也可以用padding时,尽量使用margin,当用dreamweaver中设计模式参看时,用margin能与实际页面效果更加接近。

4、 当出现如下状况时:

<div id="baihuiimage">

<img src="images/banner.jpg">

</div>

尽量改成:<div id="baihuiimage"><img src="images/banner.jpg"></div>,这样写效果更加正确。

5、 css sprites技术(背景图片拼接技术)技巧:首先,用photoshop把背景图片整合到一起,生成一张png图片。然后在写css时用background-position定位,用bg2css这个工具测出偏移量。Css 如下:

background:url(../images/index.png) no-repeat -961px -78px;

6、 当使用list-style-image属性时,css sprites会无法确定其位置,这时可使用li的background代替:如下:

background:url(../images/index.png) no-repeat -961px -78px;