Home >Web Front-end >HTML Tutorial >CSS reset_html/css_WEB-ITnose
1. Note: When resetting, avoid unnecessary resets. For example, "dt" does not have default margins. "ul" and "ol" only have left margin. . .
2. When using it, because the global font is set to 62.5%, the page must wrap the div with class "fz" and set the page font to 12px
/*reset*/
body, p, dd, dl, form, h1, h2, h3, ul, ol, textarea { margin: 0; }
ul, ol { padding- left: 0; }
td, th, button, input, select, textarea, iframe { margin: 0; padding: 0; }
body, button, input, select, option, textarea { font-family: "Microsoft YaHei", "Arial"; color: #333; font-size: 62.5%; *font-size: 63%; }
input { border: none; }
input[type="text"], input[type="password"] { text-indent: 4px; }
body { background-color: #fff; }
li { list-style: none; }
a { color: #0074d9; text-decoration: none; }
a:link { }
a: visited { }
a:hover { }
a:active { }
iframe { border: none; }
table { border-collapse: collapse; border-spacing: 0; }
/*Remove browser default effect*/
input:focus, textarea:focus, select:focus { outline: none }
/ *Remove the default glowing border of text boxes in browsers such as Chrome*/
input::-ms-clear { display: none; }
/*Remove the small cross behind the text box in ie10 browsers*/
textarea { resize: none; }
/*Disable multi-line text box textarea dragging*/
/*-------------------------- ----- single css ---------------------------*/
/*background-color*/
. bg-white { background-color: #fff; }
.bg-red { background-color: #ff4136; }
.bg-grey { background-color: #dcdcdc; }
/*border-color name rule*/
.bde { border: 1px solid #eee; }
.bbd { border-bottom: 1px solid #ddd; }
/*clear*/
.clb { clear: both; }
.cll { clear: left; }
.clr { clear: right; }
/*cursor*/
.poi { cursor: pointer; }
.def { cursor: default; }
/*colors*/
.white { color: #fff; }
.grey { color: #aaa; }
.orange { color: #FF8518; }
.red { color: #FF4136 ; }
.g3 { color: #333; }
.g6 { color: #666; }
/*display*/
.dn { display : none; }
.dib { display: inline-block; }
/*float*/
.l { float: left; }
.r { float: right; }
/*font-size*/
.fz { font-size: 1.2em; }
.fz button, .fz input, .fz select , .fz textarea, .fz option { font-size: 1em; }
.fz14, input.fz { font-size: 1.15em; }
.fz18 { font-size: 1.3em; }
.fz24 { font-size: 2em; }
/*font-family*/
.fa { font-family: Arial; }
.fv { font-family: verdana; }
.fw { font-family: 'Microsoft Yahei'; }
/*font-style*/
.n { font-weight: normal; }
.b { font-weight: bold; }
.i { font-style: italic; }
/*height*/
.h20 { height: 20px; }
/*letter-spacing*/
.lt1 { letter-spacing: 1px; }
/*line-height*/
.lh40 { line-height: 40px; }
/*margin*/
.ml5 { margin-left: 5px; }
.ml10 { margin-left: 10px; }
.mr5 { margin-right: 5px; }
.mr10 { margin-right: 10px; }
.mt5 { margin-top: 5px; }
.mt10 { margin-top: 10px; }
.mb5 { margin-bottom: 5px; }
.mb10 { margin-bottom: 10px; }
/*overflow*/
.ovh { overflow: hidden; }
.ova { overflow: auto; }
/*padding*/
. p10 { padding: 10px; }
.pl5 { padding-left: 5px; }
.pl10 { padding-left: 10px; }
.pr5 { padding- right: 5px; }
.pr10 { padding-right: 10px; }
.pt5 { padding-top: 5px; }
.pt10 { padding-top: 10px; }
.pb5 { padding-bottom: 5px; }
.pb10 { padding-bottom: 10px; }
/*position*/
. rel { position: relative; }
.abs { position: absolute; }
/*percent width value*/
.pctW { width: 100%; }
.pctH { height: 100% }
/*text-align*/
.tc { text-align: center; }
.tr { text-align: right ; }
.tl { text-align: left; }
/*text-decoration*/
.tdl { text-decoration: underline; }
.tdn { text-decoration: none; }
/*vertical-align*/
.vm { vertical-align: middle; }
.vtb { vertical-align: text -bottom; }
.vb { vertical-align: bottom; }
.vt { vertical-align: top; }
.vn { vertical-align: - 2px; }
/*visibility*/
.vh { visibility: hidden; }
.vv { visibility: visible; }
/*white-space */
.nowrap { white-space: nowrap; }
/*white-wrap*/
.bk { word-wrap: break-word; }
/ *width*/
.w100 { width: 100px; }
/*z-index*/
.zx1 { z-index: 1; }
.zx2 { z-index: 2; }
/*zoom*/
.z { *zoom: 1; }
/*------------ ------- multiply css ----------------------------*/
/*Horizontal centering of block elements*/
.auto { margin-left: auto; margin-right: auto; }
/*Clear float*/
.fix { *zoom: 1; }
.fix:after { display: table; content: ''; clear: both; }
/*Double column adaptive cell part continuous English Line break*/
.cell_bk { display: table; width: 100%; table-layout: fixed; word-wrap: break-word; }
/*Single line text overflows dotted display*/
.ell { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
/*css3 transition animation effect*/
.trans { -webkit-transition: all 0.3 s; transition: all 0.3s; }