移動端頁面 css reset

來源:互聯網
上載者:User

標籤:

這個是通用的  css reset.這個版本適用於 移動端頁面如果需要在 PC端使用,可以 修改 html{font-size: 10px;}為html{font-size: 12px;}其他地方不需要修改  =========================================@charset "utf-8";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,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td {    margin: 0;    padding: 0;    border: 0;    outline: 0;    font-weight: inherit;    font-style: inherit;    font-size: 100%;    font-family: inherit;    vertical-align: baseline;    width: 100%;    height: 100%;} html {    font-family: ‘sans-serif‘, "Microsoft YaHei", "微軟雅黑", "Tahoma", "Helvetica";    font-size: 10px;     background: #fff;    -webkit-text-size-adjust: 100%;    -ms-text-size-adjust: 100%;    -webkit-tap-highlight-color: rgba(0, 0, 0, 0)} table {    border-collapse: collapse;    border-spacing: 0;} img {    border: 0; max-width: 100%!important;    vertical-align: middle;} address,caption,cite,code,dfn,i,em,strong,th,var {    font-weight: normal;    font-style: normal;} ol,ul {    list-style: none;} a {    text-decoration: none;} a:hover,a:focus {    outline: none;} caption,th {    text-align: left;    font-weight: normal;} h1,h2,h3,h4,h5,h6 {    font-weight: normal;    font-size: 100%;} q:before,q:after {    content: ”;} abbr,acronym {    border: 0;} button,input,optgroup,select,textarea {    margin: 0;    font: inherit;    color: inherit;} * {    -webkit-box-sizing: border-box;    -moz-box-sizing: border-box;    box-sizing: border-box} :before,:after {    -webkit-box-sizing: border-box;    -moz-box-sizing: border-box;    box-sizing: border-box;} input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration {    -webkit-appearance: none;} article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary {    display: block;} @media screen and (min-width:100px){ /*  iPhone 4,5 */ html{ font-size: 10px;}}@media screen and (min-width:320px){ /*  iPhone 4,5 */ html{ font-size: 10px;}}@media screen and (min-width:375px){ /*  iPhone 6 */ html{ font-size: 12px;}}@media screen and (min-width:414px){  /*  iPhone 6 plus */ html{ font-size: 12px;}}@media screen and (min-width:600px){    html{ font-size:14px;}} 紅色程式碼片段是為了在不同解析度手機上,字型縮放 

 

移動端頁面 css reset

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.