Chrome || Firefox中将同一域名下不同端口的访问也视为跨域操作。(JS)
-----来自团队总结
| Class | IE![]() |
Mozilla![]() |
Netscape![]() |
Opera![]() |
Safari![]() |
|---|---|---|---|---|---|
|
An array of parameters passed to a function.
|
4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
An array is an ordered list of elements.
|
4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
The Boolean object is an object wrapper for a boolean value.
|
3.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
Lets you work with dates and times.
|
3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
Enumerator is a proprietary Microsoft object that iterates over items in a group.
|
4.0+ | no | no | no | no |
|
Represents a runtime error.
|
5.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
The EvalError is thrown when the eval method is used incorrectly.
|
5.0+ | 1.0+ | 6.0+ | no | no |
|
Every function in JavaScript is actually a Function object.
|
4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
The Global object is the parent of all globally avaliable properties and methods.
|
3.0+ | 1.0+ | 2.0+ | 7.0+ | no |
|
A built-in object that has properties and methods for mathematical constants and functions. For example, the Math object's PI property has the value of pi.
|
3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
Lets you work with numeric values. The Number object is an object wrapper for primitive numeric values.
|
3.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
Object is the primitive JavaScript object type. All JavaScript objects are descended from Object. That is, all JavaScript objects have the methods defined for Object.
|
4.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
Thrown when a number is out of its appropriate range.
|
5.0+ | 1.0+ | 6.0+ | no | no |
|
Thrown if reading a variable that does not exist.
|
5.0+ | 1.0+ | 6.0+ | no | no |
|
Pattern for a regular expression.
|
4.0+ | 1.0+ | 4.0+ | 7.0+ | 1.0+ |
|
Represents the characters of a string.
|
3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
A SyntaxError is thrown if there is a syntax error in the JavaScript code.
|
5.0+ | 1.0+ | 6.0+ | no | no |
|
A TypeError is thrown when a value is a different type than what was expected.
|
5.0+ | 1.0+ | 6.0+ | no | no |
|
A URIError is thrown when there is an exception with URI encoding or decoding.
|
5.0+ | 1.0+ | 6.0+ | no | no |
- pre { /* make the box translucent (80% opaque) */
- border: solid red;
- opacity: 0.8; /* Firefox, Safari(WebKit), Opera */
- -ms-filter: "alpha(opacity=80)"; /* IE 8 */
- filter: alpha(opacity=80); /* IE 4-7 */
- zoom: 1; /* set "zoom", "width" or "height" to trigger "hasLayout" in IE 7 and lower */
- }
ref:https://developer.mozilla.org/En/CSS:-moz-opacity
具体信息见置顶
目标:
“AS做AS的事(code),JS做JS的事(code),仅在沟通时用我(bridge)!"
特性
本文为转贴,因为本人也深刻体会。
原文地址:http://www.14px.com/?tag=line-height
作者:十四象素
[参与测试的浏览器:IE6 / IE7 / IE8 / FF3 / OP9.6 / SF3 / Chrome2 ]
[操作系统:Windows]
浏览器们缺乏党的教育,对行高没有统一的认识,于是在小字体小行高的情况下,总出现肉眼可见差异,对美观产生了举足轻重的影响。
要解决这一细节性的问题,我们首先得进行一番测试来了解各浏览器对于行高的认识,由于仅小行高和小字体影响比较大,我们就不探究其细节规律(比如字体大小对变化速度的影响规律)了,能在一定程度上解决问题便达到了我们想要的效果。
以下是经过一番头晕眼花的测试后得出的实验数据:
| 大小 | 行高 | 浏览器 | 宋体 | Arial纯中文 | Arial带英文字符 | |||
|---|---|---|---|---|---|---|---|---|
| 上边距 | 下边距 | 上边距 | 下边距 | 上边距 | 下边距 | |||
| 12px | 14px | ie6 | 0px | 3px | 0px | 3px | 1px | 2px |
| 12px | 14px | ie7 | 1px | 2px | 0px | 3px | 1px | 2px |
| 12px | 14px | ie8 | 1px | 2px | 0px | 3px | 1px | 2px |
| 12px | 14px | ff3 | 1px | 2px | 2px | 1px | 2px | 1px |
| 12px | 14px | chrome2 | 1px | 2px | 2px | 1px | 2px | 1px |
| 12px | 14px | op9.6 | 1px | 2px | 1px | 2px | 1px | 2px |
| 12px | 14px | sf3 | 1px | 2px | 1px | 2px | 1px | 2px |
| 12px | 15px | ie6 | 1px | 3px | 1px | 3px | 1px | 3px |
| 12px | 15px | ie7 | 2px | 2px | 1px | 3px | 1px | 3px |
| 12px | 15px | ie8 | 1px | 3px | 0px | 4px | 1px | 3px |
| 12px | 15px | ff3 | 1px | 3px | 2px | 2px | 2px | 2px |
| 12px | 15px | chrome2 | 1px | 3px | 2px | 2px | 2px | 2px |
| 12px | 15px | op9.6 | 1px | 3px | 1px | 3px | 1px | 3px |
| 12px | 15px | sf3 | 1px | 3px | 1px | 3px | 1px | 3px |
| 12px | 16px | ie6 | 1px | 4px | 1px | 4px | 2px | 3px |
| 12px | 16px | ie7 | 2px | 3px | 1px | 4px | 2px | 3px |
| 12px | 16px | ie8 | 2px | 3px | 1px | 4px | 2px | 3px |
| 12px | 16px | ff3 | 2px | 3px | 3px | 2px | 3px | 2px |
| 12px | 16px | chrome2 | 2px | 3px | 2px | 3px | 2px | 3px |
| 12px | 16px | op9.6 | 2px | 3px | 2px | 3px | 2px | 3px |
| 12px | 16px | sf3 | 2px | 3px | 2px | 3px | 2px | 3px |
| 12px | 17px | ie6 | 2px | 4px | 2px | 4px | 3px | 3px |
| 12px | 17px | ie7 | 3px | 3px | 2px | 4px | 3px | 3px |
| 12px | 17px | ie8 | 2px | 4px | 1px | 5px | 2px | 4px |
| 12px | 17px | ff3 | 2px | 4px | 3px | 3px | 3px | 3px |
| 12px | 17px | chrome2 | 2px | 4px | 3px | 3px | 3px | 3px |
| 12px | 17px | op9.6 | 2px | 4px | 2px | 4px | 2px | 4px |
| 12px | 17px | sf3 | 2px | 4px | 2px | 4px | 2px | 4px |
由表可见
1. 需要外观上非常完美的呈现单行文本垂直居中(没有1px的差异),需要设置字体为宋体。
解释:当字体为宋体的时候,各浏览器中上边距和下边距的差异都是较小的,出现问题的仅仅是IE6(行高为偶数时)与IE7(行高为奇数时),而IE6和IE7是可以很容易使用hack来通过padding的多少来精确控制其位置。
示例:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="author" content="Chomo" />
- <link rel="start" href="http://www.14px.com" title="Home" />
- <title>line-height非常完美的兼容</title>
- </head>
- <style type="text/css">
- * {margin:0; padding:0; list-style:none; }
- div { font-size:12px; font-family:simsun; line-height:15px; float:left; padding:1px 3px; *padding:0 3px 2px 3px; _padding:1px 3px; border:1px solid #000;}
- </style>
- <body>
- <div>十四像素 - 14px</div>
- </body>
- </html>
提示:你可以先修改部分代码再运行。
2. 如果确定标签内存在英文字符、数字、符号,可以设置英文字体,利用行高在15px下呈现的状态。
解释:此时仅ff3和chrome2浏览器存在些许差异,并且外观上不存在上多下少的边距。
示例:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="author" content="Chomo" />
- <link rel="start" href="http://www.14px.com" title="Home" />
- <title>line-height:15px;font-family:arial时呈现比较理想的状态</title>
- </head>
- <style type="text/css">
- * {margin:0; padding:0; list-style:none; }
- div { font-size:12px; font-family:arial; line-height:15px; float:left; padding:1px 3px; border:1px solid #000;}
- </style>
- <body>
- <div>十四像素 - 14px</div>
- </body>
- </html>
提示:你可以先修改部分代码再运行。
3. 如果不能保证是否存在英文字符、数字、符号,又需要设置英文字体保证美观,也可利用行高在15px下呈现的状态。(推荐)
解释:此时ie8浏览器下的状态不容乐观,上下差异太大:上0px,下4px,但可以利用:before伪类,赐它一个符号。
示例:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="author" content="Chomo" />
- <link rel="start" href="http://www.14px.com" title="Home" />
- <title>line-height:15px;font-family:arial时呈现比较理想的状态(即使是纯中文)</title>
- </head>
- <style type="text/css">
- * {
- margin:0;
- padding:0;
- list-style:none;
- }
- div {
- font-size:12px;
- font-family:arial;
- line-height:15px;
- float:left;
- padding:1px 3px;
- border:1px solid #000;
- }
- div:before {
- content:"1";
- margin-left:-2000px;
- margin-right:1993px;
- }
- </style>
- <body>
- <div>十四像素</div>
- </body>
- </html>
提示:你可以先修改部分代码再运行。
从2010年6月起,正式加入 kissy 开源项目。

什么是Kissy?
小巧灵活,简洁实用,
使用起来让人感觉愉悦。
Keep It
Simple & Stupid,
Short & Sweet,
Slim & Sexy...
Yeah!
咱们已搬迁至 github!
访问我们:
关于此次迁移的介绍 :
http://lifesinger.org/blog/2010/07/kissy-on-github-com/
关于github 的 kissy介绍:
http://lifesinger.org/blog/2010/08/release-kissy-1-1-0/
档案号:116
My Frist Open Source Project
Global:
"AS do AS things (code), JS do JS things (code), only communicate with me (bridge)"
目标:
“AS做AS的事(code),JS做JS的事(code),仅在沟通时用我(bridge)!"
已迁移并寄生于Kissy
project home : http://code.google.com/p/ajbridge/
svn: http://ajbridge.googlecode.com/svn/trunk/