移动web开发------公用css----自己总结
@charset "utf-8";
html, body {
background: #fff;
color: #505050;
font-size: 10px;
-moz-user-select: none; /*火狐*/
-webkit-user-select: none; /*webkit浏览器*/
-ms-user-select: none; /*IE10*/
-khtml-user-select: none; /*早期浏览器*/
user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: transparent;/*这个属性只用于iOS (iPhone和iPad)。当你点击一个链接或者通过Javascript定义的可点击元素的时候,它就会出现一个半透明的灰色背景。要重设这个表现,
你可以设置-webkit-tap-highlight-color为任何颜色。想要禁用这个高亮,设置颜色的alpha值为0即可*/
-webkit-touch-callout: none;/*系统默认菜单被禁用*/
font-family:Tahoma,Arial,Roboto,'Droid Sans','Helvetica Neue','Droid Sans Fallback','Heiti SC',sans-self;
} 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 {
margin: 0;
padding: 0;
} body, button, input, select, textarea {
line-height: 1;
} h1, h2, h3, h4, h5, h6 {
font-weight: normal;
} html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6 {
-webkit-text-size-adjust: none;
} body {
max-width: 750px;
margin: 0 auto;
}
img {
width: 100%;
vertical-align: middle;
}
/*阻止旋转屏幕时自动调整字体大小*/
textarea {
resize: none;
}
/*取消按钮在inphone上的默认样式*/
input[type=button] {
-webkit-appearance: none;
outline: none
} input::-webkit-input-placeholder {
color: #F0F0F0;
} textarea::-webkit-input-placeholder {
color: #F0F0F0;
} input::-webkit-input-speech-button {
display: none
} table {
border-collapse: collapse;
border-spacing: 0;
} th {
text-align: inherit;
} fieldset, img {
border: none;
} abbr, acronym {
border: none;
font-variant: normal;
} del {
text-decoration: line-through;
} ol, ul {
list-style: none;
} caption, th {
text-align: left;
} sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
} sup {
top: -0.5em;
} sub {
bottom: -0.25em;
} ins, a, a:hover {
text-decoration: none;
} a:focus, *:focus {
outline: none;
}
small{ font-size: 90%;}
/*清除浮动*/
.clearfix:before, .clearfix:after, header:before, header:after, footer:before, footer:after,
.col-1:before, .col-1:after, .col-2:before, .col-2:after, .col-3:before, .col-3:after,
.col-4:before, .col-4:after, .col-5:before, .col-5:after, .col-6:before, .col-6:after,
.col-7:before, .col-7:after, .col-8:before, .col-8:after, .col-9:before, .col-9:after,
.col-10:before, .col-10:after, .col-11:before, .col-11:after, .col-12:before, .col-12:after,
.row:before, .row:after {
content: "";
display: table;
} .clearfix:after, footer:after, header:after, .col-1:after, .col-2:after, .col-3:after,
.col-4:after, .col-5:after, .col-6:after, .col-7:after, .col-8:after, .col-9:after,
.col-10:after, .col-11:after, .col-12:after {
clear: both;
} .clearfix {
zoom: 1;
} .clear {
clear: both;
display: block;
font-size: 0;
height: 0;
line-height: 0;
overflow: hidden;
} .hide {
display: none;
} .block {
display: block;
} .outL {
white-space: normal;
word-break: break-all;
width: 100px;
} .outH {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100px;
} /*布局*/
.fl {
float: left;
display: inline;
} .fr {
float: right;
display: inline;
} .cb {
clear: both;
} .cl {
clear: left;
} .cr {
clear: right;
} .rel {
position: relative;
} .abs {
position: absolute;
} .tac {
text-align: center;
} .tal {
text-align: left;
} .tar {
text-align: right;
} .dib {
display: inline-block;
} .vab {
vertical-align: bottom;
} .vam {
vertical-align: middle;
} .vat {
vertical-align: top;
} /*元素垂直 水平居中*/
.box {
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-pack: center;
-webkit-box-align: center;
display: -moz-box;
-moz-box-orient: horizontal;
-moz-box-pack: center;
-moz-box-align: center;
display: -o-box;
-o-box-orient: horizontal;
-o-box-pack: center;
-o-box-align: center;
display: -ms-box;
-ms-box-orient: horizontal;
-ms-box-pack: center;
-ms-box-align: center;
display: box;
box-orient: horizontal;
box-pack: center;
box-align: center;
} /*flex*/
.row {
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
flex-direction: wrap;
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-lines: multiple;
width: 100%;
height: auto;
margin: auto;
} .flex1 {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
} .flex2 {
-webkit-box-flex: 2;
-webkit-flex: 2;
flex: 2;
} .flex3 {
-webkit-box-flex: 3;
-webkit-flex: 3;
flex: 3;
} /*flex*/ /*宽度*/
.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,
.col-7,.col-8,.col-9,.col-10 .col-11,.col-12{
float: left;
}
.col-1 {
width: 8.33333333%;
} .col-2 {
width: 16.66666667%;
} .col-3 {
width: 25%;
} .col-4 {
width: 33.33333333%;
} .col-5 {
width: 41.66666667%;
} .col-6 {
width: 50%;
} .col-7 {
width: 58.33333333%;
} .col-8 {
width: 66.66666667%;
} .col-9 {
width: 75%;
} .col-10 {
width: 83.33333333%;
} .col-11 {
width: 91.66666667%;
} .col-12 {
width: 100%;
}
移动web开发------公用css----自己总结的更多相关文章
- web开发:css总结与应用
一.常用标签的使用 二.边界圆角 三.背景样式 四.精灵图 五.盒模型布局细节 六.盒模型案例 七.w3c主页 一.常用标签的使用 <!DOCTYPE html> <html> ...
- Java Web开发——HTML CSS JavaScript 杂记
HTML是一种在互联网上常见的网页制作标注性语言,并不能算作一种程序设计语言.因为它相对程序设计语言来说缺少了其应所有的特征.对于网站设计人员来说,只使用HTML是不够的,需要在页面中引入CSS样式. ...
- web开发:css基础
一.w3c架构分析 二.css三种引入 三.三种引入的优先级 四.基础选择器 五.长度单位与颜色 六.文件样式操作 七.display 一.w3c架构分析 <!DOCTYPE html> ...
- iOS Web开发激活css的active伪类
最近在做一个资讯客户端,用到UIWebview展示一些网页内容,本来想做一个简单的按压效果,发现在css中设置active属性一直不管用. 查阅了一下资料,今天发现,要让css active伪类生效, ...
- web开发: css高级与盒模型
一.组合选择器 二.复制选择器优先级 三.伪类选择器 四.盒模型 五.盒模型显示区域 六.盒模型布局 一.组合选择器 <!DOCTYPE html> <html> <he ...
- 6. web前端开发分享-css,js移动篇
随着移动市场的逐步扩大及相关技术的日趋完善,对前端开发提出了新的岗位要求,在继承前人成果的基础上需要在新的历史条件下有新的创新.移动端的开发,虽然没有IE6众多问题的折磨,但是多平台,多设备的兼容,也 ...
- Web开发中20个很有用的CSS库
来源: 微信公众号文章 在过去的几年中,CSS已经成为一大部分开发者和设计者的最爱,因为它提供了一系列功能和特性.每个月都有无数个围绕CSS的工具被开发者发布以简化WEB开发.像CSS库,框架,应用这 ...
- Wee – 为现代 Web 开发打造的 CSS 脚手架
Wee 包含许多开发人员在搭建响应的,互动的网站和应用程序时需要的组件.正如它的名字一样,Wee 是一个微小.移动优先的 CSS 复位框架.Wee 组织在一个简单的.可扩展的层次结构,拥有一致的样式和 ...
- Normalize.css – 现代 Web 开发必备的 CSS resets
Normalize.css 是一个可定制的 CSS 文件,使浏览器呈现的所有元素,更一致和符合现代标准.它正是针对只需要统一的元素样式.该项目依赖于研究浏览器默认元素风格之间的差异,精确定位需要重置的 ...
随机推荐
- 实践与理解CMM体系
我的项目管理之路--5.实践与理解CMM体系 分类: 管理专辑(65) 过程改进(9) 软件工程(52) 版权声明:本文为博主原创文章,未经博主允许不得转载. 一个现代企业我们可以把它比作为自然界 ...
- 【内核研究】处理者_Handler
虽然MessageQueue提供了直接读/写的函数接口.但对于程序猿来说,一般不直接读/写消息队列.之前了解到,在Looper.loop()函数中.当取出消息后,会回调msg.target对象的han ...
- 使用squid架设自己的代理server
主要參考了 http://blog.chinaunix.net/uid-20778906-id-540115.html Ubuntu下Squid代理server的安装与配置 1 安装 $ sudo a ...
- react map 遍历
1.map方法 注:map 返回的是一个新数组 class App extends Component { // constructor(props) { // super(props); // th ...
- 第一个MapReduce程序——WordCount
通常我们在学习一门语言的时候,写的第一个程序就是Hello World.而在学习Hadoop时,我们要写的第一个程序就是词频统计WordCount程序. 一.MapReduce简介 1.1 MapRe ...
- 协议的注冊与维护——ndpi源代码分析
在前面的文章中,我们对ndpi中的example做了源代码分析.这一次我们将尽可能深入的了解ndpi内部的结构和运作.我们将带着以下三个目的(问题)去阅读ndpi的源代码. 1.ndpi内部是怎么样注 ...
- 实现多线程的方式Runnable
package com.thread.runnable; /** * 实现多线程的方式有继承Thread类和实现Runnable接口两种方式 * 哪种方式更好呢?实现的方式由于继承的方式. * 原因: ...
- Hibernate 配置C3P0 连接池
第一步在hibernate.cfg.xml配置 <!-- 连接池 --> <property name="hibernate.connection.provider_cla ...
- iOS 7的手势滑动返回
如今使用默认模板创建的iOS App都支持手势返回功能,假设导航栏的返回button是自己定义的那么则会失效,也能够參考这里手动设置无效. if ([self.navigationController ...
- bash shell parameter expansion
1 ${parameter%word}和${parameter%%word} ${parameter%word},word是一个模式,从parameter这个参数的末尾往前开始匹配.单个%进行最短匹配 ...