没有样式就是最好的样式

Archive for December, 2004


switch styleSheets

Dec 29, 2004 Author: | Filed under: Uncategorized

very funny code

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

firefox中禁用embed多媒体

Dec 27, 2004 Author: | Filed under: Uncategorized

又是IE不支持的css2条件判断写法,不错,有意思

If you want to be more selective, you could use this:

Code:

embed[src*=".mid"],

embed[src*=".mp3"],

embed[src*=".wav"],

embed[src*=".ra"]

{display: none !important;}

You probably get the idea. Just repeat with object:

Code:

object[data*=".mid"],

object[data*=".mp3"]

{display: none !important;}

css 字体排版技巧

Dec 27, 2004 Author: | Filed under: Uncategorized

来自 sitepoint.com 最新推出的一本书《101 Essential Tips, Tricks & Hacks》,这里有前4章内容下载

http://www.sitepoint.com/books/cssant1/

我摘录部分如下

Ems

The em is a relative font measurement, where one em is equal to the height of

the letter “M” in the default font size. Where CSS is concerned, 1em is seen to

be equal to the user’s default font size, or the font size of the parent element

when it differs. If you use ems (or any other relative unit) for all your font sizing,

users will be able to resize the text, which will comply with the text size preferences

they have set in their browsers. For example, imagine I create a declaration that

sets text within the

tag to 1em, as is shown in the following CSS:

Exes

The ex is a relative unit measurement that corresponds to the height of the

lowercase letter “x” in the default font size. In theory, if you set the font-size

of a paragraph to 1ex, the uppercase letters of the text should be the same height

as the letter “x” would have been if the font size had not been specified.

Unfortunately, modern browsers don’t yet support the typographical features

needed to determine the size of an ex precisely. They usually make a rough guess

for this measurement. For this reason, exes are rarely used at this time.

xx-small

x-small

small

medium

large

x-large

xx-large

These keywords are defined relative to each other, and browsers implement them

in different ways. Most browsers display medium at the same size as unstyled text,

with the other keywords resizing text to varying degrees. Internet Explorer 5 (and

version 6, depending on the document type), however, treats small as being the

same size as unstyled text.

These keyword measurements are considered absolute in that they don’t inherit

from any parent element. Yet, unlike the absolute values provided for height,

such as pixels and points, they do allow the text to be resized in the browser, and

will honor the user’s browser settings. The main problem with using these

keywords is the fact that, for example, x-small-sized text may be perfectly

readable in one browser, and miniscule in another.

最常用的字体

p {

font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;

}

Pseudo Order

The link pseudo-classes should be declared in the following order: link,

visited, hover, active. If they aren’t, you may find that they don’t work

as you intended. One way to remember this order is the mnemonic: LoVe-

HAte.

line-height没有单位,自适应

No Units?

You can also specify the line-height using standard CSS units of measurement,

such as ems or even pixels. But doing so breaks the link between

the line height and the font size for child elements.

For example, if the example above contained a that set a large

font-size, then the line height would scale up proportionally to maintain

the same ratio because line-height of the paragraph was set to the numerical

value 2.0. If, however, line-height was set to 2em or 200%, the

would inherit the actual line height, not the ratio, and the large font

size would not affect the line height of the span. Depending on the effect

you’re going for, this may actually be desirable.

hr标准写法(兼容型)

hr {

border: none;

background-color: #ADD8E6;

color: #ADD8E6;

height: 1px;

width: 80%;

}

不要使用blockquote来缩进排版!

You should not use the HTML tag

to indent text, unless the text

is actually a quote. Although visual editing environments such as Macromedia

Dreamweaver frequently refer to

as “indent text,” resist the

temptation to use it for this purpose; instead, set up a CSS rule to indent the

39 Click here to order the printed 375-page book now (we deliver worldwide)!

appropriate blocks.

is designed to mark up a quote, and devices

such a screen readers for the visually impaired will read this text in a way that

helps users understand that what they’re hearing is a piece of quoted text. If you

use

to indent regular paragraphs, it will be very confusing for users

to whom the content is read as a quote.

Chapter 2: Text Styling and Other Basics

链接在tab中打开?

Dec 27, 2004 Author: | Filed under: Uncategorized

哦,不知道CSS3什么时候能够实现…

http://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#target-new

firefox页面效果演示

Dec 19, 2004 Author: | Filed under: Uncategorized

都在这里

http://www.mozilla.org/start/1.0/demos.html

用IE是看不见的,用FF看吧,太阳和鹰是可以拖动的。

http://www.mozilla.org/start/1.0/demos/eagle-sun.html

左侧的a:hover菜单,IE的CSS选择器老是有这样那样的问题。其实我在FF使用样式表的时候,也有很多问题,但那是因为我对FF以及W3C标准理解的有问题,而IE则是它本身的问题。

http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html

便条

http://www.mozilla.org/start/1.0/demos/stickies.html

http://webfx.eae.net/games/minehunter/minehunter.html

http://www.brainjar.com/dhtml/menubar/demo.html

http://www.mozilla.org/start/1.0/demos/credits.html

For Web Developers

http://www.mozilla.org/start/1.0/web-developers.html

里面的这个很有意思,要仔细看看

http://zvon.org/Output/bar_list.html

参考下载:

http://zvon.org/index.php?nav_id=downloads&mime=html

[Edit on 2004-12-19 12:55:00 By guoshuang]

365key站点条目分类引用代码

Dec 18, 2004 Author: | Filed under: Uncategorized

普通引用没有分类,但rss有分类,转换一下即可,如果

以下为引用内容:

除此之外,用户所创建的分类也都有一个对应该分类的RSS:

http://www.365Key.com/rss//<分类名称>/


用rss2JS功能(下面那个rss2js你都不用写转换代码)转出来即可,比如从

http://www.365Key.com/rss/guoshuang/test/

构造出

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

参考这个

http://61.185.204.40/david/showlog.asp?cat_id=31&log_id=1671

如果自己写可以参考本站这段asp源代码

显示更多

效果在:

http://61.185.204.40/david/showlog.asp?cat_id=32&log_id=1653

[Edit on 2004-12-18 23:29:25 By guoshuang]
[Edit on 2005-4-1 10:33:44 By guoshuang]