id选择器 > 类选择器 > 标签选择器
@charset "utf-8";
charset=utf-8   表示当前文档的字符集是采用utf-8的字符,也就是我们常说英文字符集;
gbk gb2312     主要用于中文。big5  用于繁体中文
 
/*去除页面中所有标签的默认间距、补白*/
* { margin:0px; padding:0px;}
 
/*页面中的默认字体、字体大小、背景、文字颜色*/
body { font-size:12px; font-family:Arial; color:#666666; background:#ffffff; -webkit-text-size-adjust:none;}
 
webkit-text-size-adjust:none;
苹果移动设备上会识别,用于保证文字大小。

 
/*页面右侧滚动条*/
html { overflow-y:scroll;}

 
/*清除页面所有图片的默认边框1*/
img { border:none;}

 
/*去除ol、ul、li的默认样式*/
ol,ul,li { list-style-type:none;}

 
/*设置表单等项目的默认字体大小*/
input, select, textarea { color: #777777; font-family: Arial,Helvetica,sans-serif; font-size: 100%; vertical-align: middle;}

 
/*设置文字段落、表格单元格的默认行高*/
p,th,td { line-height:22px;}

 
/*字体*/
em { font-style:normal;}
.yahei { font-family:微软雅黑;}
.songti { font-family:宋体;}

 
/* 其它需要用到的字体大小 */
h1,h2,h3,h4,h5,h6 { font-weight:normal;}
h1{ font-size:14px;}
h2{ font-size:12px;}
h3{ font-size:12px;}
.font10 { font-size: 10px;}
.font11 { font-size: 11px;}
.font12 { font-size: 12px;}
.font13 { font-size: 13px;}
.font14 { font-size: 14px;}
.font15 { font-size: 15px;}
.font16 { font-size: 16px;}
.font17 { font-size: 17px;}
.font18 { font-size: 18px;}
.font20 { font-size: 20px;}
.font22 { font-size: 22px;}
.font24 { font-size: 24px;}

 
/*去除页面中的链接点击后留下的虚线框*/
body a{ outline:none;blr:expression(this.onFocus=this.blur());}

 
/* 整个网站需要的字体样式*/
.strong { font-weight:bold;}
.underline { text-decoration:underline;}

 
/* 图片边框 */
.imgp2 img { padding: 2px; border: 1px solid #cccccc; }

 
/* 1px细线 */
.div1px { border:#CCCCCC solid 1px; }

 
/* li相关 */
ul,li { list-style-type:none; }

 
/* 带着图片的li */
.imgli1 li{ list-style-image:url(../BG.jpg) ; }

 
/*默认的文字链接样式*/
a:link { color:#666666; text-decoration:none;}
a:visited { color:#666666; text-decoration:none;}
a:hover { color:#0f2c8d; text-decoration:none;}
a:active { color:#0f2c8d; text-decoration:none;}

 
/*其他文字链接样式*/
.cffffff { color:#ffffff;}
.cffffff a:link,.cffffff a:visited { color:#ffffff;}
.cffffff a:hover,.cffffff a:active { color:#cccccc;}

 
.cc3120e { color:#c3120e;}
.cc3120e a:link{ color:#c3120e;}
.cc3120e a:visited { color:#c3120e;}
.cc3120e a:hover { color:#666;}
.cc3120e a:active { color:#c3120e;}

 
/* w系列控制宽度 */
.wauto { width: auto}
.w25 { width: 25%;}
.w33 { width: 33.3%;}
.w50 { width: 50%;}
.w100 { width: 100%;}
/* h系列控制高度 */
.h100 { height:100%;}
.hauto { height:auto;}
.h20px { height:20px;}
.h30px { height:30px;}
.h55px { height:55px;}
.h86px { height:86px;}
.h255px { height:275px;}
.lineheight15px { line-height:15px;}
.lineheight18px { line-height:18px;}

.lineheight20px { line-height:20px;}
 
/* p系列控制padding */
.p5 { padding:5px;}
.p10 { padding:10px;}
.p15 { padding:15px;}
.pt2 { padding-top:2px;}
.pt5 { padding-top:5px;}
.pt10 { padding-top:10px;}
.pt15 { padding-top:15px;}
.pr5 { padding-right:5px;}
.pr10 { padding-right:10px;}
.pr15 { padding-right:15px;}
.pb5 { padding-bottom:5px;}
.pb10 { padding-bottom:10px;}
.pb15 { padding-bottom:15px;}
.pl5 { padding-left:5px;}
.pl10 { padding-left:10px;}
.pl15 { padding-left:15px;}

 
 
/* m系列控制padding */
.m5 { margin:5px!important;}
.m10 { margin:10px!important;}
.m15 { margin:15px!important;}
.mt5 { margin-top:5px!important;}
.mt10 { margin-top:10px!important;}
.mt15 { margin-top:15px!important;}
.mr5 { margin-right:5px!important;}
.mr10 { margin-right:10px!important;}
.mr15 { margin-right:15px!important;}
.mb5 { margin-bottom:5px!important;}
.mb10 { margin-bottom:10px!important;}
.mb15 { margin-bottom:15px!important;}
.ml5 { margin-left:5px!important;}
.ml10 { margin-left:10px!important;}
.ml15 { margin-left:15px!important;}

 

/*文本对齐样式*/
.center { margin:0px auto;}
.tcenter { text-align:center;}
.tleft { text-align:left;}
.tright { text-align:right;}

 
/*左右漂浮样式*/
.l { float:left;}
.r { float:right;}

 
/*css清除浮动*/
.c { clear:both}
.clear { clear:both; height:0px; line-height:0px; font-size:0px;}

 
/*clearfix:after*/
.clearfix:after { content:"."; display:block; height:0px; clear:both; visibility:hidden;}
.clearfix { display:inline-table; display:block;}
*html .clearfix { height:1%;}
*+html .clearfix { height:1%;}
.imgfix img{display:block;}

 
/* 1px细线 */
.b1s { border:1px solid #e4e4e4;}
.bt1s { border-top:1px solid #e4e4e4;}
.br1s { border-right:1px solid #e4e4e4;}
.bb1s { border-bottom:1px solid #e4e4e4;}
.bl1s { border-left:1px solid #e4e4e4;}

 
/*添加鼠标悬浮显示手的形状*/
.hand { cursor:pointer;}

 
/*单行截字*/
.textbreak { white-space:nowrap; text-overflow:ellipsis; overflow:hidden;}

 
/*最小高度*/
.minheight500px { min-height:500px; height:auto!important; height:500px; overflow:visible;}
.minheight650px { min-height:650px; height:auto!important; height:650px; overflow:visible;}
.minheight710px { min-height:400px; height:auto!important; height:400px; overflow:visible;}

 
/*隐藏元素*/
.hide {display:none;}

 
/*解决IE6双边距加倍错误*/
.inline { _display:inline;}

css写法的更多相关文章

  1. (转载)不错的CSS写法

    根据微信订阅号“设计达人”推送的文章,学到了如题知识.个人尝试了一下,感觉还不错.原文链接:http://mp.weixin.qq.com/s/g9TyBwB9xIi45TGwTBOLSQ. 字体 从 ...

  2. 优雅的css写法

    一.利用好代码折叠 css也可以进行优雅的代码折叠而且会比html更好看 折叠后的效果: 这样就可以很舒服的把它折叠起来. 二.向Twitter Bootstrap学习 1. 学习的第一点就是用cla ...

  3. html css:背景图片链接css写法

    图片作为背景,并且是链接的写法.例如网站的logo图片.例如:土豆的logo图片 <a title="土豆网 tudou.com 每个人都是生活的导演" href=" ...

  4. 清除浮动最有效的css写法

    说起来呢,基本上只要你给容器div加了float的属性,就需要清除浮动来使页面显示正常,那么,到底有什么方法可以让浮动轻松清除呢? 可以用display:flex;替代,但是它对IE8,9支持不是很好 ...

  5. table表格,让thead固定,tbody有滚动条,关键是都对齐的纯css写法。

    找了好久才找到一篇可以简单粗暴就能用的,所以拿过来算是收藏了.里面有一个css2里的命令是我没用过的也是这里面关键的:table-layout:fixed; 原理很简单,有爱研究的童鞋可以去css官网 ...

  6. html特殊字符的html,js,css写法汇总

    ⇠  箭头类 符号 UNICODE 符号 UNICODE HTML JS CSS HTML JS CSS ⇠ &#8672 \u21E0 \21E0 ⇢ &#8674 \u21E2 \ ...

  7. webkit内核浏览器的CSS写法

    -webkit-tap-highlight-color: transparent; Mobile上点击链接高亮的时候设置颜色为透明 -webkit-user-select: none; 设置为无法选择 ...

  8. css写法优化

    写css关于id,class等的命名,文件的结构,共同模块的提取,代码的复用性,可读性,扩展性,维护性都要考虑,不然后期可以会需要花大力气去进行维护修改.考虑写出足够科学的css,需要考虑下面几个方面 ...

  9. 浮出层的css写法,完美兼容IE6~10

    利用元素间的绝对定位差一像素,使用不同颜色做出浮出层小三角的效果,完美兼容各浏览器! html部分: <div class="poptip"> <span cla ...

  10. css写法效率问题

    这篇文章写的很好了,其实大多数很牛的博客,都是对国外文献的翻译,国内文章的好坏,关键取决于翻译者理解和翻译水平. https://developer.mozilla.org/en-US/docs/We ...

随机推荐

  1. mybatis的增删改查返回值小析(六)

    本文验证了通过mybatis访问数据库时的,增删改查的返回值情况. 直接看代码. 1.service层 /** *@Author: Administrator on 2020/3/12 15:15 * ...

  2. 1.1 MATLAB系统环境

    专题一 MATLAB基础知识 1.1 MATLAB系统环境 1. 续行符(三个点) 2. 当前文件夹 先建立当前文件夹,再cd 3.工作区窗口 4.搜索路径       01当前文件夹下的程序文件 变 ...

  3. 使用策略者模式减少switch case 语句

    策略者模式 很简单的一个定义:抽象策略(Strategy)类:定义了一个公共接口,各种不同的算法以不同的方式实现这个接口,环境角色使用这个接口调用不同的算法,一般使用接口或抽象类实现. 场景 在这之前 ...

  4. Vue3学习第一例:Vue3架构入门

    入门 Vue3的教程很少,官方网站实例不好整,另外由于Python的Django也掌握了,学习这个有些让人眼乱.Vue项目创建后,在public目录下面自动生成了一个index.htm,里面有个div ...

  5. RHCSA_DAY10

    分区过程 添加新硬盘--分区--格式化文件系统--挂载使用 扇区是磁盘存储数据的最小单元,默认一个扇区可以存储512字节的数据 磁盘类型介绍 IDE接口类型:主要用于个人家用计算机领域,优点价格便宜, ...

  6. 【学习笔记】Expression表达式目录树

    Expression表达式目录树:一个能拼装能解析的数据结构,语法树. 一.手动拼装表达式目录树 示例1: /// <summary> /// 展示表达式树,协助用的 /// 编译lamb ...

  7. shell免交互

    目录 一.Here Document免交互 1.1.Here Document概述 1.2.注意事项 1.3.免交互示例 wc -l实现对行数的统计 read命令接收输入并打印 passwd给用户设置 ...

  8. spring中的组合模式

    org.springframework.cache.support.CompositeCacheManager /* * Copyright 2002-2016 the original author ...

  9. awk-04-流程控制

    if 格式: if ( 条件 ) 语句 [ else 语句 ] 单分支 正则匹配判断 双分支 多分支 while 格式 while (条件) 语句 awk是按行处理的,每次读取一行,并遍历打印每个字段 ...

  10. Python语言系列-09-socket编程

    简介 软件开发的架构 1.C/S架构(client-server) 2.B/S架构 (browser-server) 网络基础概念 网络三要素: 1.ip 2.port 3.通信协议:TCP.UDP ...