安裝了FireFox3.5以後,發現之前項目網頁中有透明屬性的一些DIV都不透明瞭。因而猜測,FireFox3.5難道不支持它自家的CSS透明屬性-moz-opacity了?上網一查,果然如此。
在https://developer.mozilla.org/En/CSS:-moz-opacity裏說得很清楚了:
Note: Firefox 3.5 and later do not support -moz-opacity. By now, you should be using simply opacity.
如今都要改用opacity這個屬性。
因而要設置一下透明度爲60%的DIV就應該這樣寫了:
div.transp { /* make the div translucent */spa
-moz-opacity: /* Firefox < 3.5
opacity: 0.6; /* Firefox, Safari(WebKit), Opera)
filter: "alpha(opacity=60)"; /* IE 8 */
filter: alpha(opacity=60); /* IE 4-7 */
zoom: 1; /* needed in IE up to version 7, or set width or height to trigger "hasLayout" */
}
opacity這個是屬於CSS3裏面的東西了,屬於CSS3的標準。然而微軟IE8還不支持這一屬性。ci