您的位置:首页 > Web前端 > CSS

样式命名规范

2016-05-24 15:30 357 查看
/*@charset "gb2312";*/
html{-webkit-text-size-adjust:none; /*解决chrome浏览器下字体不能小于12px*/}
body{ font-size:12px; line-height:24px; color:#000000; font-family:Verdana, Arial, Helvetica, sans-serif;}
* {}
a{outline:none; text-decoration:none;} a:hover{ text-decoration:underline;}
html{zoom:1;}html *{outline:0;zoom:1;} html button::-moz-focus-inner{border-color:transparent!important;}
body{overflow-x: hidden; font-size:12px;} 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{margin:0;padding:0;} table{/*border-collapse:collapse;border-spacing:0;*/} fieldset,a img{border:0;} address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:normal;} li{list-style:none;} caption,th{text-align:left;} h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} q:before,q:after{content:'';}
input[type="submit"], input[type="reset"], input[type="button"], button { -webkit-appearance: none; /*去掉苹果的默认UI来渲染按钮*/} em,i{ font-style:normal;}

/**
+------------------------------------------------------------------------------
* Public Class
+------------------------------------------------------------------------------
* @subpackage  RBAC
+------------------------------------------------------------------------------
*/
.clearFiex:after{content:''; display:block; clear:both;}.clearFiex{zoom:1;}.clear{ clear:both;}/* 清除浮动*/
.colwrapper { overflow:hidden; zoom:1 /*for ie*/; margin:5px auto; }/* 高度自适应 */
.strong{ font-weight: bold;} .fl{ float: left;} .fr{ float: right;} .center{ margin:0 auto; text-align:center;}
.show{ display:block; visibility:visible;}.hide{ display: none; visibility:hidden;}
.block{ display:block;} .inline{ display:inline;}
.transparent{filter:alpha(opacity=50); -moz-opacity:0.5;/** Firefox 3.5即将原生支持opacity属性,所以本条属性只在Firefox3以下版本有效 ***/ -khtml-opacity: 0.5; opacity: 0.5; } .break{ word-wrap:break-word;overflow:hidden; /*word-break:break-all;*/}

.tal{ text-align:left} .tar{ text-align:right;}

/*文字两侧对齐*/
.justify {
text-align:justify;
text-justify:distribute-all-lines;/*ie6-8*/
text-align-last:justify;/* ie9*/
-moz-text-align-last:justify;/*ff*/
-webkit-text-align-last:justify;/*chrome 20+*/
}

.toe{
/*超出省略号*/
word-break:keep-all;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
@media screen and (-webkit-min-device-pixel-ratio:0){/* chrome*/
.justify:after{
content:".";
display: inline-block;
width:100%;
overflow:hidden;
height:0;
}
}

/* 兼容IE6的定位属性fixed,固定不动样式 */
.fixed{
position:fixed;
clip:rect(0 100% 100% 0);
_position:absolute;

/* 底部 */
bottom:0px;
left:0px;
_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);
/*_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);*/

/* 左侧 */
/*left:0px;*/
/*_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);*/
/*_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);*/
}
/* 解决固定层在IE6下闪的问题 */
*html{
background-image:url(about:blank);
background-attachment:fixed;
}
/**************************************/

/*png图片ie6下透明滤镜实现写法*/
.pngimg{filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='images/x.png');}

/**
+------------------------------------------------------------------------------
* FCK 兼容解决方案
+------------------------------------------------------------------------------
* @subpackage  RBAC
+------------------------------------------------------------------------------
*/
em{ font-style:italic !important;} strike{ text-decoration:line-through !important;} strong{ font-weight:bold !important;} u{ text-decoration:underline !important;}

/**
+------------------------------------------------------------------------------
* 表单样式
+------------------------------------------------------------------------------
* @subpackage  RBAC
+------------------------------------------------------------------------------
*/

/**
+------------------------------------------------------------------------------
* 网站整体颜色总汇
+------------------------------------------------------------------------------
* @codex  颜色:使用颜色的名称或者16进制代码,如
* @subpackage  RBAC
+------------------------------------------------------------------------------
*/
.ff8600,ff86aa a{ color:#ff8600;}

/**
+------------------------------------------------------------------------------
* 网站整字体大小
+------------------------------------------------------------------------------
* @codex   字体大小,直接使用"font+字体大小"作为名称,如
* @package  ORG
* @subpackage  RBAC
+------------------------------------------------------------------------------
*/
.font14px{ font-size:14px;}
.font9pt{ font-size:9pt;}
/*自定义字体*/
/* @font-face {  font-family: danley;  src: url('../font/danley.ttf');  }  .danley {  font-family: danley; } */

/**
+------------------------------------------------------------------------------
* 网站整布局命名规范
+------------------------------------------------------------------------------
* @codex   id和class命名采用该版块的英文单词或组合命名 如:newRelease
* @package  ORG
* @subpackage  RBAC
+------------------------------------------------------------------------------
*/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: