移動端APP CSS Reset及注意事項CSS重置


@charset "utf-8";

* {

   -webkit-box-sizing: border-box;

    box-sizing: border-box;

}

//禁止文本縮放 字體設置  取消touch高亮效果

html {

    width: 100%;

    height: 100%;

   margin: 0px;

   padding: 0px;

   -webkit-text-size-adjust: 100%;

   font-family: -apple-system, "PingFang SC","Helvetica Neue", Helvetica, STHeiTi, sans-serif;

   -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

   font-size: 62.5%;

    background: transparent;

   }

body {

    width: 100%;

    height: 100%;

   -webkit-overflow-scrolling: touch;

 }

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, sumary {

    margin: 0;

    padding: 0;

}

//清除輸入框內陰影

input, select,textarea {

border: 0;

-webkit-appearance: none;

appearance:none;

}

ol, ul {

    list-style: none;

}

//禁止選中文本內容

*:not(input, select, textArea) {

    -webkit-user-select: none;

}

//禁用長按頁面時的彈出菜單(iOS下有效) ,img和a標簽都要加

img,a{

-webkit-touch-callout:none;

}

a,a:active,a:hover {

text-decoration: none;

}

//去掉點擊鏈接和文本框對象時默認的灰色半透明覆蓋層(iOS)或者虛框(Android)

a,button,input,textarea{ 

-webkit-tap-highlight-color:rgba(0,0,0,0);

}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM