手机端重置样式———reset
html {
color: #333;
/规定主色调,依据业务场景(非必须)/
background: #F6F6F6;
/规定主背景,依据业务场景(非必须)/
overflow-y: auto;
/如果有溢出自动形成滚动条/
-webkit-text-size-adjust: 100%;
/不想让iPhone横坚屏切换的时候调节文字/
-ms-text-size-adjust: 100%;
}
html * { /所有元素/
outline: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); /去除移动端开发点击事件灰色背景如a标签/
}
body,html{
height: 100%;
font-size: 12px;
}
article,
aside,
blockquote,
body,
button,
code,
dd,
details,
div,
dl,
dt,
fieldset,
figcaption,
figure,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
header,
hgroup,
hr,
input,
legend,
li,
menu,
nav,
ol,
p,
pre,
section,
td,
textarea,
th,
ul {
margin: 0;
padding: 0;
}
input,
select,
textarea {
font-size: 100%;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
fieldset,
img {
border: none;
}
address,
caption,
cite,
code,
dfn,
em,
th,
var {
font-style: normal;
font-weight: 500;
}
ol,
ul {
list-style: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: 100%;
font-weight: 500;
}
q:after,
q:before { /在标签之间的文字两头加上引号/
content: ‘’;
}
a{
text-decoration: none;
}
/input/
button {
border: none;
}
button,
html input[type=‘button’],
input[type=‘reset’],
input[type=‘submit’] {
-webkit-appearance: button; /渲染成button的风格/
text-transform: none;
outline: none;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: #999; /输入框提示语的字体样式/
}
input::-webkit-inner-spin-button {/解决input的type="number"在部分手机端会出现一个小按钮/
-webkit-appearance: none;/去除系统默认appearance的样式,常用于IOS下移除原生样式/
}
input::-webkit-outer-spin-button {/解决input的type="number"在部分手机端会出现一个小按钮/
-webkit-appearance: none;
}
textarea {
vertical-align: top;
}
button,
input {
line-height: normal;
}
select {
margin: 0;
outline: 0;
}
input.fixAKeyboard:focus,
textarea.fixAndroidKeyboard:focus {
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
-webkit-user-modify: read-write-plaintext-only;
}
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px white inset !important;
}
button,
input[type=button],
input[type=checkbox],
input[type=reset],
input[type=submit],
label {
cursor: pointer;
user-select: none;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
input[type=submit] {
-webkit-user-modify: read-plaintext-only;
-moz-user-modify: read-plaintext-only;
-ms-user-modify: read-plaintext-only;
-o-user-modify: read-plaintext-only;
user-modify: read-plaintext-only;
}
input[type=‘search’]::-webkit-search-cancel-button,
input[type=‘search’]::-webkit-search-decoration {
-webkit-appearance: none;
}
input[type=‘search’] {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-appearance: textfield;
}
/flex box/
.flex {
display: box;
/* OLD - Android 4.4- /
display: -webkit-box;
/ OLD - iOS 6-, Safari 3.1-6 /
display: -moz-box;
/ OLD - Firefox 19- (buggy but mostly works) /
display: -ms-flexbox;
/ TWEENER - IE 10 /
display: -webkit-flex;
/ NEW - Chrome */
display: flex;
-webkit-box-lines: multiple;
-webkit-flex-wrap: wrap;
-moz-flex-wrap: wrap;
-ms-flex-wrap: wrap;
-o-flex-wrap: wrap;
flex-wrap: wrap;
}
.justify-between {
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
}
.justify-center {
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.vertical {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
*,
*:before,
*:after {
box-sizing: border-box; /所有元素以border开始计算盒子大小/
}
.clearfix:after,
.clearfix:before { /清除浮动/
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.fl {
float: left;
}
.fr {
float: right;
}
手机端重置样式———reset相关推荐
- CSS基础篇--css reset重置样式有那么重要吗?
在以前写html代码的时候,一般都会在head里添加重置样式reset.css,其内容如下: @charset "utf-8"; html, body, div, span, ap ...
- 百度编辑器的样式手机端配置
背景: 因为微擎应用二次开发,而且是手机端的,因为要求用编辑器,然后先不说后台图片怎么操作. 首先我我先说,百度编辑器存在两个可能存在的地方.第一,那个编辑器的工具栏,以及编辑器能的iframe里的内 ...
- 东北狼仙:苏宁手机端样式rem+flexible.js
手机端研究了好几天做了手机端,还好基础的程序员生活不是很难,用心做几个项目撸出来就好了,最近学些rem布局挺不错的针对手机端使用比较不错,整个页面都可以自适应解决了字体图片等等的整体变大变小不会让页面 ...
- 手机端应用的CSS字体样式规范
本人主要是前后端开发,设计不是很在行,在没有设计师的情况下,调字体样式真的很苦恼.这里整理一下自己通用的字体大小和颜色,方便后续直接使用. 这里是借鉴了微信小程序的视觉规范,主要是用于手机端H5应用. ...
- 动画自动滚动div/像素基础知识/手机端样式选择/
大体上和原网页差不多,一个主页和一个子页面 动画自动滚动div: <!DOCTYPE html> <html> <head> <meta charset=&q ...
- 在线答题 手机html样式,jQuery手机端答题代码
特效描述:jQuery 手机端答题.jQuery手机端答题代码 代码结构 1. 引入CSS 2. 引入JS 3. HTML代码 lamoda调查问卷 感谢光临lamoda体验中心! 3D时尚定制鞋开创 ...
- 如何使用 CSS 中的重置(reset)属性来重置元素在网页中的默认样式
嗨,大家好!今天,我要和你们聊聊CSS中的"重置"属性,也就是让我们一起来重置一下网页中元素的默认样式吧! 首先,让我们来看看一些常见的元素有什么特点,也就是需要"重置& ...
- reset.css 重置样式表
css重置样式表 个人整理工作中常用的css重置样式,和一些样式解决方法,并写上了注释, 大家还有什么好的重置样式,或者一些样式解决方案,欢迎留言讨论. html, body {height: 100 ...
- vux 组件打造手机端项目
其实,我用vux组件的过程是这样的,哇!太方便了!!功能好全!!太简单了!!然后,就各种"跳坑".以下排坑环节. 1.安装vux:cnpm i -S vux; 比较顺利吧. 2 ...
最新文章
- 《LoadRunner 没有告诉你的》之三——理发店模型
- 定义简单类-创建多个猫对象
- Vue项目启动webpack报错Module build failed: Error: No PostCSS Config found in......
- flume的配置和开启
- wordpress通过$wpdp更新数据表内容
- @transactional可以用在controller层吗_Spring还可以这样用缓存,你知道吗?
- python基础知识-python基础知识(一)
- bzoj 4953: [Wf2017]Posterize(DP)
- 利用 Finder 清理Mac旧档案,释放空间
- java两个数最大公约数和最小公倍数_java中请给出例子程序:找出两个数的最大公约数和最小公倍数...
- chattr 锁定文件
- 【案例】凤凰新华物流:探索智能化图书发行物流体系建设,助力出版行业担当文化建设使命-WMS
- SQL递归查询(with cte as) 物料分解
- 湖南大学头歌期中模拟试卷
- 【kubernetes/k8s源码分析】eviction机制原理以及源码解析
- 宽和窄俯卧撑哪个更难_窄距俯卧撑到底该多窄?
- MIMIC-III数据库申请流程
- 《Spring揭秘》读书笔记 3:Spring MVC
- 1.2 LaTex排版
- ArcGIS API for JavaScript 4.2学习笔记[10] 2D添加指北针widget、视图保存、视图padding(第二章完结)...