没有样式就是最好的样式

Archive for March, 2006


opera 8 icon? (浏览器图标)

Mar 25, 2006 Author: | Filed under: Uncategorized

Ubuntu 装好,然后就是弄个漂亮的主题了,于是找到一些 opera 图标…

donwload this icon

donwload this 2 pngs,2 icons 必须登录 deviantArt才能下载

donwload this icon

donwload this icon

donwload this icon

让FIREFOX保存图片更方便

Mar 24, 2006 Author: | Filed under: Uncategorized

Q:每次保存图片都不是从网页中提取,而是要从网上下载一遍,浪费网络带宽,也浪费用户时间,怎么改进?

A:“文件” ---脱机工作,再保存, 这是从 临时文件中保存。看别的网页,再取消“脱机工作”。

via http://zhidao.baidu.com/question/3230395.html

在firefox里面添加“使用迅雷下载”?

Mar 24, 2006 Author: | Filed under: Uncategorized

迅雷 5.1.0.153或更新的版本(在迅雷的“帮助”--关于中查看)

方法一:

1关闭Firefox

2迅雷 菜单中“工具”--“浏览器整合”---Firefox 找到firefox.exe [默认在 C:program filemozilla firefox]

3重开firefox

方法二

(1) 打开firefox

(2) 找到迅雷安装目录下的 thunder.xpi

(3) 拖到firefox窗口中,按提示安装。

(4)重启firefox

IE中relative 元素包含 absolute 元素 的bug

Mar 23, 2006 Author: | Filed under: Uncategorized

position:absolute 的元素如果被 同样 absolute或者 relative 的元素包裹,位置计算以其父对象坐标为准。比如运行下面的代码,firefox(2.0 alpha 1),opera(9.0 beta) 是正确的,但IE(6.0 sp2,7 beta)错误

运行代码 [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

原因为:在IE中设置了 position:relative 的元素其 hasLayout 属性为 false,而这时 IE 就得不到 div#container 的高度,所以只能以父对象的父对象为坐标基准,运行下面代码可知。

运行代码 [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

在上面的样式表中加入下面这段代码即可(但还是有1个像素的白边bug,该错误的发生来自于 百分比 的数值设定取整后的结果)。

/* Hides from IE-mac */

* html .container {height: 1%;}

/* End hide from IE-mac */

解释如下:

/* Hides from IE-mac */

/* End hide from IE-mac */

这个 为 escape(转义符号),IE-Mac 会忽略掉后面紧跟的 */ 从而屏蔽掉全部中间内容。

* html .container1 {height: 1%;}

使这段代码只在 IE 起作用。IE 中 html 的外面还有个看不见的神秘容器。

via Absolute boxes inside relative boxes

IE hasLayout 属性

Mar 22, 2006 Author: | Filed under: Uncategorized

guoshuang2006-04-16+old 9 翻译了此文 On having layout,看来起来省力一点。

hasLayout 是IE特有的一个属性。微软 filter 滤镜要求 hasLayout=true 方可执行(否则没有效果)。这个属性可能导致问题的问题还有:

* Many common IE float bugs.

* Boxes themselves treating basic properties differently.

* Margin collapsing between a container and its descendants.

* Various problems with the construction of lists.

* Differences in the positioning of background images.

* Differences between browsers when using scripting.

下列元素默认 hasLayout=true

*

*

*

*

*


*
,
运行代码 [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

hasLayout 不可写。也就是说,你不能通过 hasLayout=true 来设置 hasLayout 属性,而只能通过 width,height,zoom 等改变 hasLayout 状态。

Another thing to consider is how “layout” affects scripting. The clientWidth/clientHeight properties always return zero for elements without “layout.” This can be confusing to new scripters and is different to how Mozilla browsers behave. We can use this fact to determine “layout” for IE5.0: If the clientWidth is zero then the element does not have layout.

hasLayout=false 元素返回的 clientWidth/clientHeight 属性总是0。比如下面的代码

运行代码 [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

大多数情况下,我们是需要 hasLayout=true 的,通过CSS设置 hasLayout=true 的hack方法有:

/* */

* html .gainlayout { height: 1%; }

/* */

或者

.gainlayout { _height: 0; }

或者

或者针对最近发布的 IE 7 测试版

注意这些方法都是有局限性的,具体请参照原文

ie使用 float 要小心,具体见 http://www.satzansatz.de/cssd/onhavinglayout.html#clear

牵扯的问题越来越多,自己看吧,参考下面文章。

相关资料:

On having layout

HasLayout Overview

各种浏览器对照表

Mar 22, 2006 Author: | Filed under: Uncategorized

这个 浏览器对照表 很详细。包括下面这些浏览器的特性:

作者,是否开源,版权保护,渲染引擎,价格,发行日期,操作系统支持,书签管理功能,下载管理器,密码管理功能,表单管理,拼写检查,是否支持tab浏览,pop-up blocking,预搜索,广告过滤,页面缩放,html access 键支持,tab导航,Spatial navigation,Caret navigation,鼠标动作,文本朗读,声音控制,web 技术支持(CSS2 Frames Java JavaScript XSLT XHTML 1.0 XHTML 1.1 MathML XForms RSS Atom SVG XPath),支持协议(HTTP E-mail FTP NNTP (Usenet) SSL IRC Gopher IDN data: URL BitTorrent),支持的图片格式(JPEG GIF PNG MNG TIFF SVG PDF ),支持的语言版本,重要安全漏洞