CSS Reset

  在一份CSS Reset中又學到兩招:

  1. 可以用 unicode 來寫中文字體,以解決一些編碼上的問題。
    如:“\5b8b\4f53” 就是宋體,”\5fae\8f6f\96c5\9ed1″就是微軟雅黑。
  2. 重設滚動條,html { overflow-y: scroll; } 可以防止一些閃爍的情況,我知道IE6默認是有滚動條的,但不太清楚是怎麽個“閃爍”法。後來在群中問得個例子:同一個網站中一個頁面内容比較短(不會出現滚動條),另一個頁面内容比較長(出現滚動條),兩個頁面切換的時候會出現一些跳動的感覺。

  因為IE6默認本身就有垂直滚動條,不會有什麽問題,但其它瀏覽器就會出現上述例子的情況。重設了滚動條的樣式就可以解決這個問題。

Continue reading →

兩份CSS Reset

1份來自YUI:http://developer.yahoo.com/yui/reset/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,img {
border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-style:normal;
font-weight:normal;
}
ol,ul {
list-style:none;
}
caption,th {
text-align:left;
}
h1,h2,h3,h4,h5,h6 {
font-size:100%;
font-weight:normal;
}
q:before,q:after {
content:”;
}
abbr,acronym { border:0;
}

/*==============================*/
2.一份來自:meyerweb.com
Continue reading →