您现在的位置是:首页 > 文章详情

移动端APP CSS Reset及注意事项CSS重置

日期:2017-06-21点击:287

@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);

}

 

原文链接:https://yq.aliyun.com/articles/606350
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章