1. 程式人生 > >CSS基礎樣式(base.css)

CSS基礎樣式(base.css)

浮動 100% legend line border relative gen ase -a

@charset "UTF-8";
/*css reset*/
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
body, div, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, 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;}
input,button{outline-style: none;}
caption,th{text-align: left}
h1,h2,h3,h4,h5,h6{font-size: 100%;font-weight: normal}
q:before,q:after{content: ‘‘} /*引用,在<q></q>標簽之間的文字兩頭加上引號(")*/
abbr,acronym{border: 0}
a{text-decoration: none}
img{border: 0;}
video{background-color: #000000;}
/*hr{border:none;height: 1px;background-color: #000000;}/!*以高度作為線寬的<hr>類型*!/*/
hr{border:none;height:0;border-top: 1px solid #000000;}/*以上邊框為 線寬 的<hr>類型 */
/*border-top-style 屬性設置一個元素的頂部邊框樣式。
border-top-width 屬性設置一個元素的頂部邊框的粗細;
border-top-color 設置元素的上邊框的顏色。*/

/*鉤子,去掉這些廢棄標簽的屬性,把他們當成空盒子使用,下面三個都是行內標簽*/
s, i, em {font-style: normal;text-decoration: none;}
/*↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑*/

/*功能型*/
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
.fl{float: left;display: inline;}
.fr{float: right;display: inline;}
.pr{position: relative;}
/*內墻法清除浮動,這種方法墻的高度是可以設置的*/
.clear{clear: both;}

/*相當於內墻法,*/
.clearfix:before,
.clearfix:after {content: "";display: table;}
.clearfix:after {clear: both;}
.clearfix {*zoom: 1; /*IE/7/6*/}


/*i標簽作為這個空字符,讓行內元素垂直居中用*/
i.font{display:inline-block;height:100%;vertical-align: middle;}
/*s標簽作為雪碧圖的容器*/
i.img{display: inline-block;}
/*↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑*/

CSS基礎樣式(base.css)