移动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 文件,使浏览器呈现的所有元素,更一致和符合现代标准.它正是针对只需要统一的元素样式.该项目依赖于研究浏览器默认元素风格之间的差异,精确定位需要重置的 ...
随机推荐
- Go -- 一致性哈希算法
一致性哈希算法在1997年由麻省理工学院的Karger等人在解决分布式Cache中提出的,设计目标是为了解决因特网中的热点(Hot spot)问题,初衷和CARP十分类似.一致性哈希修正了CARP使用 ...
- 取汉子拼音首字母的VB.Net方法
'/ <summary> '/ 获得一个字符串的汉语拼音码 '/ </summary> '/ <param name="strText">字符串 ...
- 通过Python实现自动填写调查问卷
0X00 前言 快开学了,看到空间里面各种求填写调查问卷的,我才想起来貌似我也还没做.对于这种无意义的问卷,我是不怎么感冒的,所以我打算使用”特技”来完成,也就是python,顺便重新复习一下pyth ...
- uml精粹——10.状态机图
10.状态机图state machine diagram 状态机图是常见的描写叙述一个系统行为的技术. 在面向对象的方法中,为单个类绘制一个状态机图来展示单个对象的生命周期行为. 见图10.1 图 ...
- XStream 数组(List)输出结构
<!-- 期望的DOM树 --> <Articles> <item> <Title>微信SDK初步结构</Title> <Descri ...
- 【C语言天天练(九)】动态内存分配
引言:数组的元素存储于内存中连续的位置上.当一个数组被声明时.它所须要的内存在编译时就被分配. 可是,我们能够使用动态内存分配在执行时为它分配内存. 一块内存的生命周期能够分为四个阶段:分配.初始化. ...
- Effective C++ 条款四 确定对象被使用前已被初始化
1.对于某些array不保证其内容被初始化,而vector(来自STL)却有此保证. 2.永远在使用对象前初始化.对于无任何成员的内置类型,必须手工完成. int x = 0; c ...
- Spark Streaming性能优化系列-怎样获得和持续使用足够的集群计算资源?
一:数据峰值的巨大影响 1. 数据确实不稳定,比如晚上的时候訪问流量特别大 2. 在处理的时候比如GC的时候耽误时间会产生delay延迟 二:Backpressure:数据的反压机制 基本思想:依据上 ...
- PHP中的多行字符串传递给JavaScript方法两则
PHP和JavaScript都是初学.近期有这么个需求: 例如说有一个PHP的多行字符串: $a = <<<EOF thy38 csdn blog EOF; 传递给JavaScrip ...
- centos 7.xx 安装LAMP环境
一.安装Apache 1.安装yum -y install httpd2.开启apache服务systemctl start httpd.service3.设置apache服务开机启动systemct ...