没有样式就是最好的样式

Archive for October, 2005


xhtml 与 html 4 的区别

Oct 26, 2005 Author: | Filed under: Uncategorized

Documents must be well-formed

Well-formedness is a new concept introduced by [XML]. Essentially this means that all elements must either have closing tags or be written in a special form (as described below), and that all the elements must nest.

Although overlapping is illegal in SGML, it was widely tolerated in existing browsers.

良好的xml文档结构,比如下面的代码不正确(overlapping elements)

here is an emphasized paragraph.

Element and attribute names must be in lower case

元素和属性名必须小写

For non-empty elements, end tags are required

标签必须有结束标志

Attribute values must always be quoted

属性值必须有引号

下面的 3 必须用引号括起来

“3>

Attribute Minimization

支持最少的属性。很多html的属性在 xhtml中消失了,比如 img align=”absmiddle”

Empty Elements

空元素也必须结束,如


Whitespace handling in attribute values

属性值中,头、尾的空格将会忽略,中间多个连续空格也将视为一个。

Script and Style elements

script 和 style 必须声明如下:

> & 等符号必须转义为 > & 等

另一种办法就是使用外部引用.js和.css文件。

SGML exclusions

SGML gives the writer of a DTD the ability to exclude specific elements from being contained within an element. Such prohibitions (called “exclusions”) are not possible in XML.

For example, the HTML 4 Strict DTD forbids the nesting of an ‘a’ element within another ‘a’ element to any descendant depth. It is not possible to spell out such prohibitions in XML. Even though these prohibitions cannot be defined in the DTD, certain elements should not be nested. A summary of such elements and the elements that should not be nested in them is found in the normative Appendix B.

The elements with ‘id’ and ‘name’ attributes

xhtml中只有a, applet, form, frame, iframe, img 和 map 标签具有name属性。其它只能用 id 。注意,将来所有name都会被放弃,全部使用id。

原文来自:

http://www.w3.org/TR/2000/REC-xhtml1-20000126/

[Edit on 2005-10-26 14:21:59 By guoshuang]
[Edit on 2005-12-18 15:52:09 By guoshuang]

浏览器安全测试

Oct 24, 2005 Author: | Filed under: Uncategorized

http://bcheck.scanit.be/bcheck/

关于Opera 9.0 Preview 1

Oct 24, 2005 Author: | Filed under: Uncategorized

最大的传闻就是页面显示“快”。

大致改变如下:

- support for XSLT, Canvas 2D, and Web Forms 2.0

- rich-text editing on Web pages

- site-specific preferences

- a new IMAP back-end

- access to Opera’s preferences via opera:config

我比较感兴趣的变化如下:

1.opera:config 可比firefox的 about:config 直观多了。

2.终于替换了 ctrl+t 快捷键打开新 tab,取消了原来的 ctrl+n(原来是打开新page,现在是打开新窗口),以前用firefox习惯了,总是不自觉地按下去,结果没反应,:(而且也不再坚持自己所谓 page 与 tab 不同的理念。兼容,兼容重要啊。

3.内置源代码查看器。感觉不怎么样,连行号、语法高亮都没有,:(

4.Implemented designMode for rich text editing.

Opera 9.0 Preview 1

5.支持 DOM3 的 Node.textContent(也就是IE的 Node.innerText)

6.Added support for onreadystatechange events, and the readyState property.

7.Added window.getSelection, and associated methods.

8.Fix to allow scripts to override a CSS #double #id selector. (什么意思?待查)

9.Fix to reset scrolling as needed when removing content from an element with overflow.

firefox 也有这问题,内容用js都删了,但站位不变。

10.Corrected use of :hover with no element selector.??

11.Elements with overflow:hidden; can scroll to anchors within them.(should be tried)

12.Allowed positioned elements to appear in front of iframes and objects.

这下下拉菜单不会钻到flash 和ifame 下面去了。

13.content:attr() now works for ’style’ attributes.

opera 9或者firefox(Gecko/20051019)可以取出style 内容

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

14.Object iframes now accept transparent backgrounds.

15.Added support for quotes:none;???

16.Site-specific settings are now available as part of the site-specific ini settings. A User Interface for these settings is not yet available.

greasemonkey 可以下岗了?

完整changelog

http://snapshot.opera.com/windows/w90p1.html

opera 9.0 pre 1讨论在此

下载地址:

http://snapshot.opera.com/windows/o90p1_8031.exe

[Edit on 2005-10-24 10:20:09 By guoshuang]
[Edit on 2005-10-24 14:58:44 By guoshuang]
[Edit on 2006-1-5 11:03:23 By guoshuang]

flock 可做的13件事

Oct 24, 2005 Author: | Filed under: Uncategorized

1.The Star button

flock给 bookmark或者add favorite起了个新名词叫 “star …”,除了传统意义上收录(藏)以外还同步收录到del.icio.us社会书签。

2.Tagging

flock的 favorites可以加注 tag来便于分类管理,查找等。

3.Favorites Manager

收藏夹管理器,可以 collection或者tag两种方式来管理书签和feeds。

4.History Search

flock的搜索框(默认右上角)带预搜索(或者叫 suggestion),而且搜索包括历史纪录中的页面。

5.Most Frequently Visited / Most Recently Added

加入了 经常访问的页面|最近访问的页面 功能。类似于 opera 的top10功能。

6.Multiple favorites toolbars

多个收藏工具栏。就是收藏栏右面的”Default”那里,可以对收藏栏进行分类,以便显示更多。(类似netscape 8.x)

7.Feed discovery

Feed 自动挖掘。这和firefox很象,地址栏右侧显示feed按钮(如果页面中指定了feed源的话)。区别在于 firefox 点击收录,flock则是直接切换在 feed查看和html查看 之间切换。

8.Feed caching

如果你star(收藏)了一个含feed的页面,那么feed会被缓存且每小时更新一次。这和firefox livebookmark 默认的刷新时间一样。

9.On the Fly Aggregation

分类(collection)聚合同类站点feed。

10.Blogging

Flock整合了blog编辑发布工具,包括wordpress(及wordpress主机服务),Movable Type 以及 Typepad,马上支持Live Journal和blogger.com。

11.Blog This!

选择页面中的文字甚至图片、链接等开始写博(当然一般最好就是痛骂批驳之,嘿嘿…)。

12.Flickr topbar

flick topbar,方便使用flick的图片。

13.The Shelf

书架。有点象windows剪贴板(但不会前后冲掉)。把文字、图片、链接等先丢到这个临时的地方,以便待会儿写博(痛骂,还是痛骂,嘿嘿…)只能是web内容。

原文来自 13 things you can do with Flock (and how to do them)

[Edit on 2005-10-24 9:36:57 By guoshuang]

Flock 插件

Oct 24, 2005 Author: | Filed under: Uncategorized

这是你切换到flock首先需要的插件,切换到opera或者IE浏览器。

opera view

ie view

firefox 插件转换说明:

在xpi 包中的 insatll.pdf中加入如下代码即可。(flock插件转换视频):

显示更多

注意:xpi文件是zip包而不是rar。我用winrar转换总是不成功,用winzip可以!

flock官方插件地址

flock 可用插件地址

flock插件转换(from firefox extensions)说明

flock插件转换说明(视频)

flock可用插件及测试

[Edit on 2005-10-24 10:57:40 By guoshuang]
[Edit on 2005-10-24 15:58:40 By guoshuang]
[Edit on 2005-10-26 8:12:08 By guoshuang]

flock 有戏还是没戏谁说了算?

Oct 24, 2005 Author: | Filed under: Uncategorized

一个与互联网隔绝的周末之后,中文世界也到处是一片讨论flock的声音,总的意见大约就是悲观、不看好…那么我想问,flock 有戏还是没戏谁说了算?

别的不说,当我告诉李英颖韬出了个flock时,他的第一反映就是,“人家老外在创新,咱们tmd地在干什么?”

我觉得flock的想法很好,现在的firefox 越来越象原来的mozilla,更加关注底层的核心,陷入了bug的汪洋大海,可我装浏览器是为了用,无休止的nightly build以及插件对build 版本的过分敏感,再加上一大堆bookmark、feed、bookmarklets都需要不停的折腾,假如都象opera一样,一次都装好,那干嘛不呢?

今天我还看见有人问能不能把ping back 也丢进去…假如一打开flock就可以直接 star to (365key,furl,delicious等等),可以feed reader,维护flick直至写Blog,那干嘛不呢?我倒是希望flock把同步del.icio.us、flick,Blogging的功能做成开放的、可自定义形式的。

不管怎么说,这种想法(更要命的是人家不仅想了,而且已经做了出来!)都值得我们思考和尊敬。

[Edit on 2005-10-24 8:38:46 By guoshuang]