初始化css样式
html,body,div,ul,li,ol,a,input,textarea,p,dl,dt,dd{margin:0;padding:0;}
ul li{list-style: none;}
a{text-decoration: none;cursor: pointer;}
html{height: 100%;}
body{height: 100%;background: #f5f5f5;position: relative;font-family: '微软雅黑';max-width: 640px;margin:auto;}
a,input,img,textarea,span,div{outline: 0;-webkit-tap-highlight-color:rgba(255,0,0,0);}
html {
font-family:"宋体", "Times New Roman", Times, serif;
/*谷歌浏览器字体最小字体12px*/
-webkit-text-size-adjust: 100%;/*100%/none 关闭字体大小自动调整功能*/
/*a标签及拥有 :active伪类的元素有默认的高亮框*/
-webkit-tap-hightlight-color: transparent;
/*禁止文本被选中*/
}
body{
overflow-x:hidden;
/*开启moblie网页快速滚动和回弹的效果*/
-webkit-overflow-scrolling: touch;
font-size: 12px;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
-webkit-text-size-adjust: 100%; /*关闭自动调整字体*/
overflow-scrolling: touch;
-webkit-tap-highlight-color:rgba(0,0,0,0);
}
*{
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-style: normal;
}
a{
border:none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color:transparent;
outline:none;
color: #333;
-webkit-tap-highlight-color: #fff;
text-decoration: none;
}
a:hover,
a:focus{
text-decoration:none;
outline:none;
}
a.line,.topLine{
position:relative;
}
a.line:after,.topLine:after{
content:"";
position:absolute;
right:0;
top:0;
}
a.line:after{
height:100%;
width:1px;
-webkit-transform:scaleX(0.5);
transform:scaleX(0.5);
border-right:1px solid #ccc;
}
.topLine:after{
height:1px;
width:100%;
-webkit-transform:scaleY(0.5);
transform:scaleY(0.5);
border-top:1px solid #ccc;
}
img{
border: 0;
display: inline-block;
width:100%;
height:100%;
vertical-align: middle;
}
input{
outline: none;
border: none;
/*-webkit-appearance: none;*/
}
.fl{
float:left;
}
.fr{
float:right;
}
.clearfix:after{
content:"";
display:block;
width:100%;
height:0;
clear:both;
}
li,ol{
list-style:none;
}
.vertical-view{
display:-webkit-box;
display:-webkit-flex;
display:flex;
-webkit-box-orient:vertical;
-webkit-box-direction:normal;
-webkit-flex-direction:column;
flex-direction:column;
}
.horizontal-view{
display:-webkit-box;
display:-webkit-flex;
display:flex;
-webkit-box-orient:horizontal;
-webkit-box-direction:normal;
-webkit-flex-direction:row ;
flex-direction:row;
}
.inline-block{
display:block;
}
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<!--屏蔽标签拨号/email/address链接-->
<meta name="format-detection" content="telephone=no" />
<meta name="format-detection" content="email=no" />
<meta name="format-detection" content="adress=no" />
<!--不启用缓存-->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
初始化css样式的更多相关文章
- 初始化 CSS 样式
为什么要初始化 CSS 样式 因为浏览器的兼容问题,不同浏览器对有些标签的默认值是不同的,如果没对 CSS 初始化往往会出现浏览器之间的页面显示差异. 当然,初始化样式会对 SEO 有一定的影响,但鱼 ...
- 为什么要初始化css样式
因为浏览器的兼容问题,不同浏览器对有些标签的默认值是不同的,如果没对CSS初始化往往会出现浏览器之间的页面显示差异. 初始化CSS样式主要是提高编码质量,如果不初始化整个页面做完很糟糕,重复的CSS样 ...
- 为什么不建议使用统配符初始化 css 样式
为什么不建议使用统配符初始化 css 样式 * { padding:0; margin:0; } 采用这样的写法好处是写起来很简单,但是通配符,需要把所有的标签都遍历一遍,当网站较大时,样式比较多,这 ...
- Web前端面试指导(十六):为什么要初始化CSS样式?
题目点评 这个题目乍一看感觉怪怪的,什么叫初始化样式了?如果换一句话你可能就理解了,就是通用样式.这道题目主要涉及的是理论方面的知识,不用写代码,只要描述清楚就可以了 初始化样式的原因 因为浏览器的兼 ...
- 初始化css样式的原因
不同的浏览器对有些标签属性的默认值是不同的,如果没有做初始化处理,往往会出现不同浏览器页面表现的差异
- 标准初始化css样式表
body { font-size:12px; line-height:1.3; font-family:'微软雅黑', Tahoma,Helvetica,Arial,'宋体', sans-serif; ...
- CSS样式初始化代码
CSS样式初始化代码 为什么要初始化CSS? 建站老手都知道,这是为了考虑到浏览器的兼容问题,其实不同浏览器对有些标签的默认值是不同的,如果没对CSS初始化往往会出现浏览器之间的页面差异.当然,初始化 ...
- css样式初始化代码总结
编写css样式之前需要初始化css样式,总结如下: /* CSS Document */ html, body, div, span, object, iframe,h1, h2, h3, h4, h ...
- cssText设置css样式
js中用cssText设置css样式 (2012-08-21 10:40:22) 转载▼ 标签: js 如果网页中一个 id为“no”的标签,暂且当div标签来tell:想要在js中设置这个div ...
随机推荐
- fastjson转换包含date类型属性的对象时报错com.alibaba.fastjson.JSONException: For input string: "13:02:19"
问题:time类型数据插入不进mysql数据库:调试的时候报如下错误: Caused by: java.lang.NumberFormatException: For input string: &q ...
- 我的黑苹果之路 9400f + msi b360 mortar + 1050ti
硬件配置: CPU:i5 9400f 主板:微型msi迫击炮B360 内存:威刚 ddr4 8g 2133 *2 显卡:技嘉1050ti 4g 显示器:koiso 4K (使用的dp接口连接,hdmi ...
- HDU-5215 Cycle 无向图判奇环偶环
题意:给一个无向图,判断这个图是否存在奇环和偶环. 解法:网上有一种只用dfs就能做的解法,但是我不太理解. 这里用的是比较复杂的.首先奇环很简单可以用二分图染色判断.问题是偶环怎么判断?这里我们想, ...
- 【Muduo库】【base】基本类
一.Timestamp类 1.类图如下: 2. 知识点 (1) 这个类继承了 muduo::copyable, 以及 boost::less_than_comparable. (2) ...
- propTypes和 defaultProps
propTypes和 defaultProps propTypes: 可以 用来做类型的校验 限制类型 isRequired 必须要求传递 要使用必须先引入: import PropTypes fro ...
- 历史上最详细的SpringCloud搭建微服务的过程。(包括注册中心,服务提供者和服务消费者)
首先搭建注册中心,创建一个springboot的maven工程. 工程创建完成之后,先在资源文件中的application.properties中写配置文件. server.port= spring. ...
- rails问题检查
在做rails postgresql过程中,使用同事的老代码,然后坐到db:migrate时发现总是报错 这种错误是无法在百度或者google搞定的,需要去进入到底层查看 所以需要进入相关文件看,到d ...
- BAT批处理知识 及 常用批处理
1.常用DOS命令:https://blog.csdn.net/qq_38676810/article/details/79584531 或 https://www.jb51.net/articl ...
- java内存泄露与内存溢出
内存溢出 out of memory,是指程序在申请内存时,没有足够的内存空间供其使用,出现out of memory: 内存泄露 memory leak,是指程序在申请内存后,无法释放已申请的内存空 ...
- C/S模式简单socket通信
TCP连接方式 sever.c #include <stdio.h>#include <stdlib.h>#include <sys/socket.h>#inclu ...