1、兼容FF與IE的透明度設置:
filter:Alpha(Opacity=50); opacity:0.5;
2、兼容各瀏覽器的最小高度
min-height:100px; /*高度最小值設置為:100px*/
height:auto !important; /*兼容FF,IE7也支持 !important標簽*/
height:100px; /*兼容ie6*/
3、<meta http-equiv="X-UA-Compatible" content="IE=7" />表示將IE8瀏覽器以IE7的標準執行;
4、網頁圖片背景與顏色背景同時起效的設置(圖片背景優先顯示):
background: url(Bg.gif) no-repeat;
background-color: #cfe4a3;
5、去掉鏈接(包括圖片鏈接)的虛線邊框:
a,area { blr:expression(this.onFocus=this.blur()) }
:focus { outline: none; }
6、如紀念某地震日,使網頁由彩色全變黑白,只需要一句 css 代碼。使用 css 的濾鏡:
view plaincopy to clipboardprint?
html { filter:Gray; }
html { filter:Gray; }或 view plaincopy to clipboardprint?
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }注:樣式加在 body 不能使 Google Adsense 等用 script 輸出的內容變灰,加在 html 上則可以。
專業的系統開發公司
您身邊的網絡服務專家
全套自主開發授權使用
滿足您各種開發需求
7×24小時·極速響應