IE8将不再支持CSS中的expression。

IE8将不再支持CSS中的expression。

微软IE官方博客报道:IE8标准模式下将不再支持CSS的expression功能。

CSS expression

今天从IE的官方blog中看到了这篇文章——《Ending Expressions》。文章指出在IE8的标准模式下,将不再对CSS expression进行支持。也许有人会纷纷表示影响不大,因为有些人甚至都不知道什么是CSS的expression,也从来没有用过。但是,我感觉这个微软给予我们的信息,却是应该让人纷纷表示影响很大的。而这个信息就是——新一代的浏览器并不给保证优雅的向前兼容,必要的时候,会舍弃一些他们认为可以舍弃的内容。所以从今天开始,写网页的时候,请尽量的使用标准来写吧,一些hack和技巧还是减少使用吧。

IE8停止对CSS expression的支持,会不会使得以前使用了CSS expression的网页在IE8下无法使用呢?《Ending Expressions》这篇文章的最后给出了回答——

Pages on my web site depend on CSS expressions. How does this affect me ?

Thanks to IE8’s new layout engine, most expressions written to work around CSS 2.1 bugs and shortcomings should no longer be needed; we expect unsupported or incorrectly interpreted properties to work in a standard, interoperable way. For those expressions supporting more specific purposes, anything they do is inherently achievable using standard JavaScript, usually interoperably and at lower runtime costs. The specifics will of course depend on your application. Based on your feedback to this post, we may visit examples in future installments.

简单的说来就是——对不起,帮不了你,您老人家还是改成JavaScript或者其他办法实现吧。

不知道这会不会造成大批的网页从此只能在IE5-IE7上使用(从IE5才开始支持CSS expression)呢?也许吧。

你说,做个网页咋就那么难呢?既要考虑浏览器以前的版本,还要考虑浏览器以后的版本,最可恶的是,还不是就IE一种浏览器。

随着谷歌浏览器的杀入,浏览器市场现在真是无比的热闹呀。看来真的有必要考虑对浏览器实行”渐进增强支持”了(相关资料请看下方资料列表《Understanding Progressive Enhancement》一文)。

本篇文章的相关链接

  • 《实例讲解css中的行为:expression和behavior(附DEMO下载)》
  • 《Ending Expressions》
  • 《Understanding Progressive Enhancement》
  • 《Understanding Progressive Enhancement》中文翻译

IE8将不再支持CSS中的expression。

相关文章:

你感兴趣的文章:

标签云: