<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="renderer" content="webkit" /> <meta content="always" name="referrer" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
1.不同瀏覽器的標簽默認的外補丁和內補丁不同。解決:*{margin:0;padding:0;}2.chorme瀏覽器下字體最小12px解決:font-size:12px; -webkit-transform-origin-x: 0; -webkit-transform: scale(0.5833333333333334);scale=?/12;3.Ie瀏覽器中height和line-height必須成對寫。4.ie6是有雙倍的margin和padding.
解決:增加display:inline;寫在float和margin一起。5.jquery中Trim()方法在ie8下失效不兼容,trim()是針對string類型的。解決:使用這個函數最好使用$.trim()或:(1) 去掉字符串前后所有空格function trim(str){ return str.replace(/(^/s*)|(/s*$)/g, "");}(2)//去除空格,包括前后,中間(包括中間空格,需要設置第2個參數為:g)function Trim(str, is_global) { var result; result = str.replace(/(^/s+)|(/s+$)/g, ""); if (is_global.toLowerCase() == "g") { result = result.replace(//s/g, "");}return result;}6. 使用bootstrap中的 模態框要調用respond.js,這個js要在bootstrap.js之后引用。
7.在360等瀏覽器有時候說鼠標放上去或出現滾動條,在最外面增加overflow-x:hidden;
8.使用 setTimeout注意清空,傳參數時要這樣寫setTimeout(function(){Inde("a","c")},10000)
新聞熱點
疑難解答