移动端必备的样式

*{    -webkit-text-size-adjust: none;
}  input[type="button"], input[type="submit"], input[type="reset"] {
    -webkit-appearance: none;
}
textarea {
    -webkit-appearance: none;
}
a, button, input, textarea {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0;
)  -webkit-user-modify:read-write-plaintext-only;
}
html {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
img { -webkit-touch-callout: none; }
html {font-size:10px}

@media screen and (min-width:480px) and (max-width:639px) {
    html {
        font-size: 15px
    }
}
@media screen and (min-width:640px) and (max-width:719px) {
    html {
        font-size: 20px
    }
}
@media screen and (min-width:720px) and (max-width:749px) {
    html {
        font-size: 22.5px
    }
}
@media screen and (min-width:750px) and (max-width:799px) {
    html {
        font-size: 23.5px
    }
}
@media screen and (min-width:800px) and (max-width:959px) {
    html {
        font-size: 25px
    }
}
@media screen and (min-width:960px) and (max-width:1079px) {
    html {
        font-size: 30px
    }
}
@media screen and (min-width:1080px) {
    html {
        font-size: 32px
    }
}
时间: 2024-08-25 10:43:54

移动端必备的样式的相关文章

[程序员入行必备]CSS样式之优先级

专业玩家请移步:http://www.w3.org/TR/CSS2/cascade.html 使用CSS控制页面样式时,经常出现设定的样式被"覆盖",不能生效的情况. 浏览器是依据怎样的优先次序判断CSS样式的优先级的呢? 总结如下: 样式的来源 样式有多处来源,有网页开发作者设定的.有浏览器默认的.还有网页用户设定的.各种样式声明逐层叠加,或继承.或覆盖.或叠加计算,影响元素的展现效果. 样式的来源依次有: 1.浏览器默认样式: 2.用户样式: 3.作者链接样式: 4.作者页内嵌入样

移动端页面默认样式重置

1.-webkit-tap-highlight-color -webkit-tap-highlight-color:rgba(0,0,0,0);//透明度设置为0,去掉点击链接和文本框对象时默认的灰色半透明覆盖层(iOS)或者虚框(Android) -webkit-tap-highlight-color:rgba(255,0,0,0.5);   //利用此属性,设置touch时链接区域高亮为50%的透明红,只在ios上起作用.android上只要使用了此属性就表现为边框.在body上加此属性,这

移动端一些默认样式调整

1.-webkit-tap-highlight-color -webkit-tap-highlight-color:rgba(0,0,0,0);//透明度设置为0,去掉点击链接和文本框对象时默认的灰色半透明覆盖层(iOS)或者虚框(Android) -webkit-tap-highlight-color:rgba(255,0,0,0.5);  //利用此属性,设置touch时链接区域高亮为50%的透明红,只在iOS上起作用.Android上只要使用了此属性就表现为边框.在body上加此属性,这样

目前公司用到的PC端和移动端的初始化样式

pc端样式重置 *{ margin:0; padding:0;} body{ font-size:14px; font-family:微软雅黑;font-style:normal;} a{ text-decoration:none} a,a:hover{  transition:background 0.5s linear;-webkit-transition:background 0.5s linear;-moz-transition:background 0.5s linear;-o-tra

html Css PC 移动端 公用部分样式代码整理

css常用公用部分样式代码整理: body, html, div, blockquote, img, label, p, h1, h2, h3, h4, h5, h6, pre, ul, ol, li, dl, dt, dd, form, a, fieldset, input, th, td {margin: 0; padding: 0; border: 0; outline: none;} ul, ol{list-style: none;} a{color: black;text-decora

pc端,移动端css重置样式

pc: html{font-family:"Microsoft YaHei UI","Microsoft YaHei",sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} html,body,div,object,iframe,applet,object,h1,h2,h3,h4,h5,h6,p,blockquote,pre,address,dl,dt,dd,ol,ul,li,tabl

移动端重构--重置样式

html { font-family: "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; font-size: 62.5%; } body { margin: 0; font-size: 1.4rem; line-height: 1.5; color: #333333; background-color:

写移动端必备的meta标签

<meta name="renderer" content="webkit" /> <meta http-equiv="X-UA-Compatible" content="IE=EDGE, chrome=1"> <meta name="viewport" content="width=device-width, height=device-height, initia

DAY44-前端入门-css的三种引用方式以及优先级、样式与长度颜色、常用样式、css选择器

目录 一.css的三种引用方式 行间式 内联式 外联式 二.三种引入的优先级 三.样式与长度颜色 基本样式 长度 颜色 四.常用样式 字体样式 文本样式 背景样式 五.css选择器 基础选择器 基础选择器优先级 组合选择器 组合选择器优先级 属性选择器 一.css的三种引用方式 行间式 1.在标签头部的style 2.属性值是css语法 3.属性值用Key:value形式赋值,value具有单位 4.属性值之间用;隔开 <div style='width:100px;height=100px;b