body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin:0; padding:0; }
body, button, input, select, textarea { font:12px Arial, Tahoma, 宋体; color:#454545; }
button, input, select, textarea, h1, h2, h3, h4, h5, h6 { font-size:100%; }
h2, h3 { font-size:14px; }
button, input, select, textarea, label { vertical-align:middle; outline:none; }
img { vertical-align:middle; border:none; display:inline-block; background:#fff url(/images/common/nopic.png) center no-repeat; }
ul, ol { list-style:none; }
a { text-decoration:none; color:#454545; vertical-align:baseline; cursor:pointer; }
a:hover { text-decoration:underline; color:#000; }
table { border-collapse:collapse; border-spacing:0; }
body { word-wrap:break-word; word-break:break-all; _height:100%; }

/*输入框*/
.g-txt { height:23px; line-height:23px; border-width:1px; border-style:solid; border-color:#454545 #ccc #ccc #454545; padding-left:3px; }
.g-txt:hover, .g-txt.focus { background-color:#fffcc5; }
/*--------------*/
/*--------------*/
/*单项公共样式开始*/
/*--------------*/
/*--------------*/
/*顶底边框*/
.g-bt-n { border-top:none !important; }
.g-bb-n { border-bottom:none !important; }
.g-b-dd { border:1px solid #dddddd; }
/*背景色*/
.g-bc-w { background-color:#fff }
.g-bi-n { background-image:none !important; }
/*字体灰色*/
.g-c-22 { color:#222; }
.g-c-33 { color:#333; }
.g-c-66 { color:#666; }
.g-c-99 { color:#999; }
/*字体白色*/
.g-c-w { color:#fff; }
/*字体红色*/
.g-c-r { color:#e25150; }
/*绿色*/
.g-c-green { color:#579719; }
/*清浮*/
.g-cf:after { content:""; clear:both; display:table; }
.g-cf { zoom:1; }
/*浮动*/
.g-f-l { float:left !important; _display:inline; }
.g-f-r { float:right !important; _display:inline; }
/*显示隐藏*/
.g-d-n { display:none; }
.g-d-b { display:block; }
.g-d-i { display:inline; }
.g-d-ib { display:inline-block; }
.g-v-h { visibility:hidden; }
.g-v-v { visibility:visible; }
/*字体宋体*/
.g-ff-s { font-family:宋体; }
/*字体风格*/
.g-fs-n { font-style:normal; }
/*字体加粗*/
.g-fw-b { font-weight:bold; }
.g-fw-n { font-weight:normal; }
/*字体大小*/
.g-fz-18 { font-size:18px; }
.g-fz-16 { font-size:16px; }
.g-fz-15 { font-size:15px; }
.g-fz-14 { font-size:14px; }
.g-fz-12 { font-size:12px; }
/*高、行高*/
.g-h-a { height:auto !important; }
.g-lh-18 { line-height:18px !important; }
.g-h-22 { height:22px !important; }
.g-lh-22 { line-height:22px !important; }
.g-h-24 { height:24px !important; }
.g-lh-24 { line-height:24px !important; }
.g-h-25 { height:25px !important; }
.g-lh-25 { line-height:25px !important; }
.g-lh-30 { line-height:30px !important; }
/*最小高度*/
.g-mh-20 { min-height:20px; _height:20px; }
.g-mh-50 { min-height:50px; _height:50px; }
/*外边距*/
.g-mlr-a { margin-left:auto; margin-right:auto; }
.g-m-10 { margin:10px; }
.g-mtb-10 { margin-top:10px; margin-bottom:10px; }
.g-mlr-10 { margin-left:10px; margin-right:10px; }
.g-mt-10 { margin-top:10px; }
.g-mb-10 { margin-bottom:10px; }
.g-ml-10 { margin-left:10px; }
.g-mr-10 { margin-right:10px; }
.g-m-5 { margin:5px; }
.g-mtb-5 { margin-top:5px; margin-bottom:5px; }
.g-mlr-5 { margin-left:5px; margin-right:5px; }
.g-mt-5 { margin-top:5px !important; }
.g-mb-5 { margin-bottom:5px !important; }
.g-ml-5 { margin-left:5px !important; }
.g-mr-5 { margin-right:5px !important; }
.g-mt-n { margin-top:0 !important; }
.g-mb-n { margin-bottom:0 !important; }
.g-ml-n { margin-left:0 !important; }
.g-mr-n { margin-right:0 !important; }
/*内边距*/
.g-p-10 { padding:10px; }
.g-ptb-10 { padding-top:10px; padding-bottom:10px; }
.g-plr-10 { padding-left:10px; padding-right:10px; }
.g-pt-10 { padding-top:10px; }
.g-pb-10 { padding-bottom:10px; }
.g-pl-10 { padding-left:10px; }
.g-pr-10 { padding-right:10px; }
.g-p-5 { padding:5px; }
.g-ptb-5 { padding-top:5px; padding-bottom:5px; }
.g-plr-5 { padding-left:5px; padding-right:5px; }
.g-pt-5 { padding-top:5px !important; }
.g-pb-5 { padding-bottom:5px !important; }
.g-pl-5 { padding-left:5px !important; }
.g-pr-5 { padding-right:5px !important; }
.g-pt-n { padding-top:0 !important; }
.g-pb-n { padding-bottom:0 !important; }
.g-pl-n { padding-left:0 !important; }
.g-pr-n { padding-right:0 !important; }
.g-pt-20 { padding-top:20px !important; }
/*overflow*/
.g-o-h { overflow:hidden !important; }
.g-o-a { overflow:auto !important; }
.g-o-v { overflow:visible!important; }
/*相对定位*/
.g-p-r { position:relative; }
/*水平右中左*/
.g-ta-r { text-align:right !important; }
.g-ta-c { text-align:center !important; }
.g-ta-l { text-align:left !important; }
/*垂直上中下*/
.g-va-t { vertical-align:top !important; }
.g-va-m { vertical-align:middle !important; }
.g-va-b { vertical-align:bottom !important; }
.g-va-bl { vertical-align:baseline !important; }
/*缩进*/
.g-ti-1 { text-indent:1em; }
.g-ti-2 { text-indent:2em; }
.g-ti-3 { text-indent:3em; }
.g-ti-4 { text-indent:4em; }
.g-ti-5 { text-indent:5em; }
/*下划线*/
.g-td-n { text-decoration:none !important; }
/*强制不换行*/
.g-ws-w { white-space:nowrap; }
/*强制换行*/
.g-ww-bw { white-space:normal; word-wrap:break-word; word-break:break-all; }

css中一些必要的公共样式的更多相关文章

  1. CSS中的ul与li样式详解

    CSS中的ul与li样式详解ul和li列表是使用CSS布局页面时常用的元素.在CSS中,有专门控制列表表现的属性,常用的有list-style-type属性.list-style-image属性.li ...

  2. CSS中的ul与li样式详解 list-type

    转自新浪博客http://blog.sina.com.cn/u/2539885750 ul和li列表是使用CSS布局页面时常用的元素.在CSS中,有专门控制列表表现的属性,常用的有list-style ...

  3. CSS中关于多个class样式设置的不同写法

    html中: <div class="containerA"> 这是AAAAAAAAAAAAAAAAAAAAAAA样式 <div class="cont ...

  4. CSS中margin: 0 auto;样式没有生效

    问题:有两个元素: A, B.两则是嵌套关系,A是B的父节点.A和B都是块元素.当在A上设置:margin: 0 auto的时候,B并没有在页面中居中. margin: 0 auto 为什么没有生效? ...

  5. CSS中的定位与浮动

    CSS中的定位与浮动 本文主要讲述CSS中的三种定位样式static.relative和absolute的区别以及浮动元素的特征. 定位样式 CSS中定位样式position的取值有三个,默认值:st ...

  6. css 中的 initial inherit unset 意思

    写css时,在对属性进行选值,经常遇到unset , initial,inherit三个值.这几个值的含义. 1.inherit 可继承性 继承的意思. 每一个 CSS 属性都有一个特性就是,这个属性 ...

  7. CSS覆盖公共样式中的某个属性

    CSS如何覆盖公共样式中的某个属性?利用CSS样式的优先级. 如下例子: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transition ...

  8. 【经验】在CSS中定义超链接样式a:link、a:visited、a:hover、a:active的顺序

    以前用CSS一直没有遇到过这个问题,在最近给一个本科同学做的项目里面.出现一些问题,搜索引擎查了一些网站和资料,发现很多人问到这个问题,给出的结果我试了试,大部分都不正确. 给出我试的顺序,可能会对大 ...

  9. 使用jquery修改css中带有!important的样式属性

    当CSS中含有!important的样式属性时,普通的修改方式是会出现失败的.如下: <div class="test">使用jquery修改css中带有!import ...

随机推荐

  1. Delegate, Method as Parameter.

    代理, 将方法作为另一方法的参数. 类似C里面的函数指针. using System; using System.Windows.Forms; using System.Threading; name ...

  2. vi 使用入门

    几种模式:     Normal Mode 命令模式     Insert Mode 编辑模式     Command-line Mode      Visual Mode      Select M ...

  3. 高级php面试题(转)

    一.mysql相关知识    1. mysql优化方式            MYSQL 优化常用方法            mysql 性能优化方案      2.如何分库分表            ...

  4. http://blog.csdn.net/shawnkong/article/details/52045894

    http://blog.csdn.net/shawnkong/article/details/52045894

  5. 封装、调用ajax

    1.JavaScript代码 //封装ajaxfunction ajax(obj) { var xhr = new createXHR(); obj.url = obj.url + '?rand=' ...

  6. ATL开发 ActiveX控件的 inf文件模板

    ATL开发 ActiveX控件的 inf文件模板    

  7. php使用curl简单抓取远程url的方法

    这篇文章主要介绍了php使用curl简单抓取远程url的方法,涉及php操作curl的技巧,具有一定参考借鉴价值,需要的朋友可以参考下     本文实例讲述了php使用curl抓取远程url的方法.分 ...

  8. grunt安装与运行

    用grunt前,需要先安装nodejs.因为grunt依赖于nodejs.nodejs的安装可以参照我的博客里头的nodejs的下载,安装与测试.   第一步:安装grunt-CLI 注意你的电脑要联 ...

  9. 关于Onvif的event

    昨天又仔细研究了一下camera的alarm功能,发现原来很简单,首先订阅一下,即create,拿到订阅号后直接pull,一旦收到信息就再次用订阅号pull.参考http://www.doc88.co ...

  10. leetCode 354. Russian Doll Envelopes

    You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envel ...