使用旧版的jquery 1.4.2时,在IE下不响应select的change事件(event),试过很多办法,包括bind(“change click”,…)等等,都没有效果。无意间在使用了.delegate(),意外发现问题得到解决。

在调用$(selector).live(“change”,)前,加入下面的语句:

44d9fc2e0a74c7e6aefff166bc106e8b0[......]

Read more

Tags: , , , ,

admin on 十月 6th, 2011

这个一个非常诡异的事情。我写了一个网站,AlternativeSplicingMiner,开发过程全部是在MAC上做的,于是没有注意到它在IE上的显示问题。后来到IE下一测试,许多问题都出来了。不能居中,margin总是比想象的大,position不能fix等等。怎么改写css都无解。后来,在生成的网页前加上了一句:

<!DOCTYPE  PUBLIC "-//W3C//DTD X[......]

Read more

Tags: , ,

我们知道使用css当中的text-align:justify就可以实现两端对齐了。比如下面这

<div style="text-align: justify; width: 300px">In olden times when wishing still helped one, there lived a king whose daughters were all beautiful; and the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. Close by the king's castle lay a great dark forest, and under an old lime-tree in the forest was a well, and when the day was very warm, the king's child went out to the forest and sat down by the fountain; and when she was bored she took a golden ball, and threw it up on high and caught it; and this ball was her favorite plaything.</div>

In olden times when wishing still helped one, there lived a king whose daughters were all beautiful; and the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. Close by the king’s castle lay a great dark forest, and under an old lime-tree in the forest was a well, and when the day was very warm, the king’s child went out to the forest and sat down by the fountain; and when she was bored she took a golden ball, and threw it up on high and caught it; and this ball was her favorite plaything.

我们知道,这种排版很类似Office Word的排版方式。如果有类似TEX的排版,对于这些非等宽字体,就会更好看了。Bram Stein就为我们用javascript实现了这样的功能。

比较我们可以发现,使用javascript的话,排版会更紧凑。其实它更强大之处还在于图文混排。当然那需要更强的图层控制能力。
[......]

Read more

Tags: , , ,

admin on 五月 16th, 2010

苹果公司所有产品的进化树示意图,你在上面可以找到所有的苹果公司的产品

苹果树

苹果树

[......]

Read more

Tags: , ,

admin on 五月 16th, 2010

非常的漂亮和清晰,你在点菜的时候可以很清楚的知道自己什么时候可以吃到它。

另类的菜谱设计

另类的菜谱设计

Tags: , ,

20分钟后,血压恢复正常;

8小时内,血液中一氧化碳含量下降一半,载氧量恢复正常;

48小时内,你心脏病发作的可能性下降,尼古丁被排出体外,味觉和嗅觉恢复正常水平;

72小时内,支气管放松,体能水平增高;

2个星期内,内循环水平提高,并且在之后的十个星期内持续改善;

3~9个月,随着肺活量增加10%,咳嗽,气喘,或者呼吸疾病会消失;

1年,心脏病发作的可能性下降[......]

Read more

Tags: , ,

admin on 五月 6th, 2010

成年人当中,男女上网的比例均等,约为74%。

18-29年龄段上网的比例最大,约93%。随着年龄的增大,上网比例下降。

收入多少对上网带宽呈现正相关。而教育程度与上网比例关系为,教育程度越高,上网的比例越大。

上网的人群当中,38%的人一天内会多次使用网络;21%的人一天一次;13%的人一周3-5次;13%的人一周1-2次;4%的人几周一次。较2005年六月,上网的次数均有增加。[......]

Read more

Tags: , , ,

admin on 四月 29th, 2010

5快速索引

HTML5 Visual Cheat Sheet (Reloaded)

HTML5口袋书

html5口袋书

html5口袋书

[......]

Read more

Tags: , , ,

admin on 四月 29th, 2010

在不同的国家,不同的颜色会给人不同的感受。比如说对中国人来讲,红色是喜庆,幸运,等等。无论是摄影,还是设计,不同的色彩给人的不同心理感受也是从业者必须考虑的一件事情。但是要讲清楚不同文化背景下人们对色彩的感觉,的确是一件很难的事情。甚至就连我们自己文化内的色彩文化也很难清晰明了的表达出来。

下面这张图大约地以简明的方式提供给大家世界不同文化背景下代表国家或地区的人们对于颜色的认知,以色盘的方式,让人检索。

色彩与文化

色彩与文化

[......]

Read more

Tags: , , , ,

admin on 四月 26th, 2010

上次介绍的荧光按钮其实是其于这一次的代码基础上加上了背景特效而已。那么一个漂亮的CSS3按钮应该如何实现呢?

其实很简单。首先确定按钮风格。3的色彩模式为RGBA,RGB大家都很熟悉,A呢其实就是透明度。看代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.button, .button:visited {
	background: #222 url(overlay.png) repeat-x;
	display: inline-block;
	padding: 5px 10px 6px;
	color: #fff;
	text-decoration: none;
	-moz-border-radius: 6px;
	-webkit-border-radius: 6px;
	-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.6);
	-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.6);
	text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
	border-bottom: 1px solid rgba(0,0,0,0.25);
	position: relative;
	cursor: pointer
}

然后确定按钮的大小。分成small, medium 和 large。

44d9fc2e0[......]

Read more

Tags: , , ,