Jump to navigation

You are currently browsing all posts tagged with 'firefox'

关于Firefox 3.6与Discuz 7.2的兼容性问题

  • Posted on March 19, 2010 at 12:56 pm
Firefox 3.6 has removed document.getBoxObjectFor which will impact Gecko detection.
原文: The getBoxObjectFor() method has been removed, as it was non-standard and exposed even more non-standard stuff to the web. See bug 340571. Also affects MooTools which uses this call for Gecko detection; this has been fixed in the latest version of MooTools, so be sure to update.
所以用下面的方法来检测浏览器是否为firefox,是错误的。
document.getBoxObjectFor && USERAGENT.indexOf(‘firefox’) != -1 && USERAGENT.substr(USERAGENT.indexOf(‘firefox’) + 8, 3);
某个版本的discuz正是这样做的。
Firefox 3.6 has removed document.getBoxObjectFor which will impact Gecko detection.
原文:
The getBoxObjectFor() method has been removed, as it was non-standard and exposed even more non-standard stuff to the web. See bug 340571. Also affects MooTools which uses this call for Gecko detection; this has been fixed in the latest version of MooTools, so be sure to update.
所以用下面的方法来检测浏览器是否为firefox,是错误的:
document.getBoxObjectFor && USERAGENT.indexOf(‘firefox’) != -1 && USERAGENT.substr(USERAGENT.indexOf(‘firefox’) + 8, 3);
某个版本的discuz正是这样做的。

Firefox、safari以及chrome中实现图片的水平翻转与垂直翻转效果

  • Posted on January 5, 2010 at 3:38 pm

IE中的CSS滤镜,有一个filter: FlipH  可以把图片进行水平翻转,还有一个filter:FlipV 可以把图片进行垂直翻转。

而CSS滤镜是IE特有的东西,那么,在firefox中怎么办呢?

IE中的filter: FlipH

等价于Firefox safari 和chrome中的

-moz-transform: matrix(-1, 0, 0, 1, 0, 0);
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);

IE中的filter: FlipV

等价于Firefox safari 和chrome中的

-moz-transform: matrix(1, 0, 0, -1, 0, 0);
-webkit-transform: matrix(1, 0, 0, -1, 0, 0);

测试代码:

<style>
.flip_x {
 /**水平翻转**/
 /** IE **/
 filter: FlipH;
 /** FF **/
 -moz-transform: matrix(-1, 0, 0, 1, 0, 0);
/**safari 和chrome **/
 -webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
}
.flip_y {
 /**垂直翻转**/
 /** IE **/
 filter: FlipV;
 /** FF **/
 -moz-transform: matrix(1, 0, 0, -1, 0, 0);
/**safari 和chrome**/
 -webkit-transform: matrix(1, 0, 0, -1, 0, 0);
}
.flip_xy {
 /** IE **/
 filter: FlipV;
 filter: FlipH;
 /** FF **/
 -moz-transform: matrix(-1, 0, 0, -1, 0, 0);
/**safari 和chrome**/
 -webkit-transform: matrix(-1, 0, 0, -1, 0, 0);
}
</style>

正常情况:<img src='http://www.google.com/intl/en_ALL/images/logo.gif'><BR>
水平翻转:<img class='flip_x' src='http://www.google.com/intl/en_ALL/images/logo.gif'><BR>
垂直翻转:<img class='flip_y' src='http://www.google.com/intl/en_ALL/images/logo.gif'><BR>
双翻:<img class="flip_xy" src='http://www.google.com/intl/en_ALL/images/logo.gif'><BR>

效果图:
效果图

Top