由於各瀏覽器不同公司各自為政,沒有依照W3C的規定標準作,

所以才會有同一個語法,但在不同瀏覽器呈現的卻不同的問題

因此才會有reset.css這支成是去幫你做統一的動作!很方便唷!

 

下面是目前最多人使用的Eric Meyer v2.0版本


 

/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,
a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,
strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,
label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,
details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,
section,summary,time,mark,audio,video
{
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
} /* HTML5 display-role reset for older browsers */
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section
{
display: block;
}

 

body {
line-height: 1;
}

 

ol,ul {
list-style: none;
}

 

blockquote,q {
quotes: none;
}

 

blockquote:before,blockquote:after,q:before,q:after {
content: '';
content: none;
}

 

table {
border-collapse: collapse;
border-spacing: 0;
}


 


 

另外在YUI裡面也有提供reset.css這邊就不做分享

下面這段程式碼為YUIfont.css

 統一在網頁每個tag的文字預設統一,如下:

 

/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
/**
* Percents could work for IE, but for backCompat purposes, we are using keywords.
* x-small is for IE6/7 quirks mode.
*/
body {
font:13px/1.231 arial,helvetica,clean,sans-serif;
*font-size:small; /* for IE */
*font:x-small; /* for IE in quirks mode */
}

/**
* Nudge down to get to 13px equivalent for these form elements
*/
select,
input,
button,
textarea {
font:99% arial,helvetica,clean,sans-serif;
}

/**
* To help tables remember to inherit
*/
table {
font-size:inherit;
font:100%;
}

/**
* Bump up IE to get to 13px equivalent for these fixed-width elements
*/
pre,
code,
kbd,
samp,
tt {
font-family:monospace;
*font-size:108%;
line-height:100%;
}
/* YUI CSS Detection Stamp */
#yui3-css-stamp.cssfonts { display: none; }

 



CSS Framework

  1. Blueprint
  2. 960 Grid System
  3. 更多的CSS Reset及CSS Framework
  4. 960 Grid介紹
  5. knockout.js

cabuchi 發表在 痞客邦 PIXNET 留言(0) 人氣()