GT-X970 入手

November 8th, 2008

等了快两个星期的EPSON GT-X970终于到了,嗲。马上开扫

CSS Hack 笔记

January 17th, 2008

做个笔记,原文在这里

CSS Hack是在标准CSS没办法兼容各浏览器显示效果时才会用上的补救方法,在各浏览器厂商解析CSS没有达成一致前,我们只能用这样的方法来完成这样的任务.

我进行前端开发的时候,测试用的浏览器大致有: IE7, IE6, Opera9(文章撰写时版本为9.25 8825), Safari3(文章撰写时版本为3.0.4 523.15), Firefox2(文章撰写时版本为2.0.0.11).

在正常的 selector { property:value; } 的基础上常会根据具体情况为相同元素使用Hack以达到浏览器间统一.

IE系列:

  • selector { +property:value; } 在属性名前加上加号”+”,这个Hack只有IE系列可以识别.
  • selector { *property:value; } 在属性名前加上星号”*”,这个Hack只有IE系列可以识别.
  • selector { _property:value; } 在属性名前加上下划线”_”,这个Hack只有IE系列 (除IE7外) 识别.
  • * html selector{ property:value; } 在选择器上运用继承法 * html selector, 这个Hack只有IE系列 (除IE7外) 可以识别.
  • html/**/ >body selector { property:value; } 在选择器上运用继承法 html/**/ >body selector ,这个Hack只有IE系列 (除IE7外) 可以识别.
  • selector { property/**/:value; } 在属性名和冒号”:”之间加入注释,屏蔽IE6用.
  • selector/**/ { property/**/:value; } 在选择器和花括号”{”之间以及在属性名和冒号”:”之间加入注释,屏蔽IE5和IE6用 (不屏蔽IE5.5) .
  • select/**/ { property:value; } 在选择器和花括号”{”之间加入注释,屏蔽IE5用.
  • *+html selector { property:value !important; } 在选择器上运用继承法 *+html selector 再加上 !important, 这个Hack只有IE7可以识别.

Firefox:

  • *:lang(lang) selector { property:value !important; } 用伪类lang(语言)再加上!important进行定义的话,目前只有Firefox可以识别.

Safari:

  • selector:empty { property:value !important; } 用伪类empty再加上!important进行定义的话,目前只有Safari可以识别.

Opera:

  • @media all and (min-width: 0px){ selector { property:value; } } 利用特殊继承法进行定义的话,目前只有Opera可以识别.

以上的Hack并不完整,欢迎大家补充.

对Hack的运用,最普遍的是CSS盒模型Hack,清除浮动Hack.

CSS盒模型在IE5.X上是有严重解析错误的.这个Hack针对IE5.X:
selctor { width:IE5.X宽度; voice-family :”\”}\”"; voice-family:inherit; width:正确宽度; }

清除浮动Hack,相信这个定义用的人很多:
selector:after { content:”.”; display:block; height:0; clear:both; visibility:hidden; }

另外还有很多很多CSS Hack的运用,一一列举的话可能能写成一本书了…想到再添加吧

csshacks.gif

Scrybe

December 9th, 2006

Scrybe是基于flash平台的RIA,可用于安排日程,管理任务,并收集来自网络的信息。从youtube的这段video看,无论是功能还是ue,都很强的说,已经申请了beta测试,如果能拿到帐户的话,也许再会贴点具体的信息上来。另外还有一段更长的video,感兴趣的可以一起看看。

CNET上的评论说:
It’s like using a Macintosh: these UI cues make it much easier for your brain to follow what your hands are doing with your mouse. Adding and modifying appointments is easy and intuitive. There are no awkward page loads or jarring pop-ups as there are in lesser online calendars. Everything works just as it would in a real app.

是不是真的这么好,还是拭目以待吧。还有不得不说一句,旁白的印度口音,真是可爱。

早上又有朋友问我这个问题,Geoff Stearns的网站又上不去,干脆把adobe的link贴在这里,省得每次都要找。

Adobe - Developer Center : JavaScript Flash Player Detection and Embedding with SWFObject

VW’s parking tower

November 15th, 2006

germancaryard.jpg

Volkswagen在德国Wolfsburg开设的全新概念的停车库,一幢20层的圆塔形建筑。停车,取车全部都是自动完成,更快速,更方便,也更安全,而占地面积最多只有传统停车库的20%。不过最吸引我的,这排列起来的视觉效果,太正点了。