====== 常用代码初始化模板 ====== === HTML初始化 ===
主体内容
=== CSS初始化 === /*@font-face { font-family: 'INTER'; src: url('../font/INTERSTATECOND.eot'); src: url('../font/INTERSTATECOND.eot?#font-spider') format('embedded-opentype'), url('../font/INTERSTATECOND.woff') format('woff'), url('../font/INTERSTATECOND.ttf') format('truetype'), url('../font/INTERSTATECOND.svg') format('svg'); font-weight: normal; font-style: normal; }*/ @charset "utf-8"; /* 初始化CSS */ blockquote, body, button, dd, div, dl, dt, form, h1, h2, h3, h4, h5, h6, input, li, ol, p, pre, td, textarea, th, ul { margin: 0; padding: 0; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } li { list-style: none } fieldset,img { display: inline-block; vertical-align: middle; border: none } h1, h2, h3, h4, h5, h6 { font-weight: 400 } h4, h5, h6 { font-size: 100% } button, input, optgroup, option, select, textarea { font-family: inherit; font-size: inherit; font-style: inherit; font-weight: inherit; outline: 0; vertical-align: middle } pre { white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word } table { border-collapse: collapse; border-spacing: 0 } body { line-height: 24px; font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif } hr { height: 1px; margin: 10px 0; border: 0; clear: both } a { color: inherit; text-decoration: none; } a:active, a:hover { outline: 0 } a:hover { color: #777 } .clearfix:after { display: block; visibility: hidden; clear: both; height: 0; content: ""; } .clearfix { zoom: 1; } .fl { float: left; } .fr { float: right; } /*对图片适应的处理*/ .img-fill { object-fit: fill; } .img-contain { object-fit: contain; } .img-cover { object-fit: cover; } .img-none { object-fit: none; } .img-scale-down { object-fit: scale-down; } /*小号文字 scale以12号字体为基准 需写实际字号大小*/ .font_adjust { -webkit-text-size-adjust: none; } .font_scale8 { -webkit-transform: scale(0.66); } .font_scale10 { -webkit-transform: scale(0.83); } .font_lc { -webkit-transform-origin: left center; } .font_rc { -webkit-transform-origin: right center; } .font_up { text-transform: uppercase; } /*transition*/ .tranimg200 img { -webkit-transition: all 0.2s linear; -moz-transition: all 0.2s linear; transition: all 0.2s linear; } .tranimg300 img { -webkit-transition: all 0.3s linear; -moz-transition: all 0.3s linear; transition: all 0.3s linear; } .tranimg400 img { -webkit-transition: all 0.4s linear; -moz-transition: all 0.4s linear; transition: all 0.4s linear; } .tranimg500 img { -webkit-transition: all 0.5s linear; -moz-transition: all 0.5s linear; transition: all 0.5s linear; } .tranimg1000 img { -webkit-transition: all 1s linear; -moz-transition: all 1s linear; transition: all 1s linear; } .scaleimg img:hover { -webkit-transform: scale(1.1); -moz-transform: scale(1.1); transform: scale(1.1); } /*网页限定宽度*/ .con_1000 { position: relative; margin: 0 auto; width: 1000px; } .con_1000:after { content: ""; display: block; height: 0; clear: both; } === AJAX请求模板 ===