重新整理base.css 标签见名知意

用网上各种复制粘贴来的base.css,经常忘记某个标签的名称(因为标签多为简写模式),当调用某个class时,不得不去查看css源码,基于此,我写了一套见名知意的base.css

源码如下:

@charset "utf-8";
/* CSS Document */

/*
CSS reset
重置浏览器默认css设置
*/
htm_left{color:#000;background:#FFF;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pr,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
address,cap_topion,cite,code,dfn,em,strong,th,var,op_topgroup{font-style:inherit;font-weight:inherit;}
del,ins{text-decoration:none;}
li{list-style:none;}
cap_topion,th{text-align:left;}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
q:before,q:after{content:‘‘;}
abbr,acronym{border:0;font-variant:normal;}
sup{vertical-align:baseline;}
sub{vertical-align:baseline;}
legend{color:#000;}
input,button,textarea,select,op_topgroup,op_topion{font-family:inherit;font-size:inherit;font-style:inherit;}
input,button,textarea,select{*font-size:100%;}
a{ text-decoration:none;}
a:hover{ text-decoration:underline;}
a:focus { outline: none; }
.float_l,float_r{ display:inline;}

/*
color
字体颜色取值
*/
.color_666{
    color:#666;
}
.write{
    color:write;
}
.red{
    color:red;
}
.green{
    color:green;
}
.blue{
    color:blue;
}
.gray{
    color:gray;
}
.yellow{
    color:yellow;
}
/*
font-size
字号取值
*/
.font_12{
    font-size:12px;
}
.font_14{
    font-size:14px;
}
.font_16{
    font-size:16px;
}
.font_18{
    font-size:18px;
}
.font_20{
    font-size:20px;
}
.font_24{
    font-size:24px;
}
/*
font-weight
字体宽度取值
*/
.f_bold{
    font-weight:bold;
}
/*
float
浮动取值
*/
float_l{
    float:left;
}
float_r{
    float:right;
}
/*
disp_leftay
区块取值
*/
.hidden{
    display:none;
}
.block{
    disp_leftay:block;
}
.inline{
    disp_leftay:inline;
}
.inline_block{
    disp_leftay:inline-block;
}
/*
position
定位取值
*/
.position_abs{
    position:absolute;
}
.position_rel{
    position:relative;
}
/*
background-color
背景颜色取值
*/
.bgc_gray_333{
    background-color:#333;
}
.bgc_gray_666{
    background-color:#666;
}
.bgc_gray_999{
    background-color:#999;
}
.bgc_gray_ccc{
    background-color:#ccc;
}
.bgc_blue{
    background-color:blue;
}
/*
list-style
列表风格取值
*/
.li_s_none{
    list-style:none;
}
/*
text-align
文本位置取值
*/
.text_center{
    text-align:center;
}
.text_left{
    text-align:left;
}
.text_right{
    text-align:right;
}
/*
text-decoration
下划线取值
*/
.text_d_none{
    text-decoration:none;
}
.text_d_under{
    text-decoration:underline;
}
/*
text-indent
首行缩进取值
*/
.indent_24px{
    text-indent:24px;
}
.indent_2em{
    text-indent:2em;
}
/*
line-height
行高取值
*/
.line_h_150{
    line-height:150%;
}
.line_h_180{
    line-height:180%;
}
.line_h_200{
    line-height:200%;
}
/*
clear
浮动清除取值
*/
.clear_b{
    clear:both;
}
.clear_l{
    clear:left;
}
.clear_r{
    clear:rigth;
}
/*
width
宽度取值
*/
.w10{width:10px;}
.w20{width:20px;}
.w30{width:30px;}
.w40{width:40px;}
.w50{width:50px;}
.w60{width:60px;}
.w70{width:70px;}
.w80{width:80px;}
.w90{width:90px;}
.w100{width:100px;}
.w200{width:200px;}
.w300{width:300px;}
.w400{width:400px;}
.w500{width:500px;}
.w600{width:600px;}
.w700{width:700px;}
.w800{width:800px;}
.w998{width:998px;}
.w1001{width:1001px;}
/*
margin
外边距取值
*/
.m_auto{margin:auto;}
.m10{margin:10px;}
.m15{margin:15px;}
.m30{margin:30px;}
.m_top5{margin-top:5px;}
.m_top10{margin-top:10px;}
.m_top_top15{margin-top:15px;}
.m_top20{margin-top:20px;}
.m_top30{margin-top:30px;}
.m_top50{margin-top:50px;}
.m_top100{margin-top:100px;}
.m_bottom5{margin-bottom:5px;}
.m_bottom10{margin-bottom:10px;}
.m_bottom15{margin-bottom:15px;}
.m_bottom20{margin-bottom:20px;}
.m_bottom30{margin-bottom:30px;}
.m_bottom50{margin-bottom:50px;}
.m_bottom100{margin-bottom:100px;}
.m_left5{margin-left:5px;}
.m_left10{margin-left:10px;}
.m_left15{margin-left:15px;}
.m_left20{margin-left:20px;}
.m_left30{margin-left:30px;}
.m_left50{margin-left:50px;}
.m_left100{margin-left:100px;}
.m_right5{margin-right:5px;}
.m_right10{margin-right:10px;}
.m_right15{margin-right:15px;}
.m_right20{margin-right:20px;}
.m_right30{margin-right:30px;}
.m_right50{margin-right:50px;}
.m_right100{margin-right:100px;}
/*
padding
内边距取值
*/
.p10{padding:10px;}
.p15{padding:15px;}
.p30{padding:30px;}
.p_top5{padding-top:5px;}
.p_top10{padding-top:10px;}
.p_top15{padding-top:15px;}
.p_top20{padding-top:20px;}
.p_top30{padding-top:30px;}
.p_top50{padding-top:50px;}
.p_top100{padding-top:100px;}
.p_bottom5{padding-bottom:5px;}
.p_bottom10{padding-bottom:10px;}
.p_bottom15{padding-bottom:15px;}
.p_bottom20{padding-bottom:20px;}
.p_bottom30{padding-bottom:30px;}
.p_bottom50{padding-bottom:50px;}
.p_bottom100{padding-bottom:100px;}
.p_left5{padding-left:5px;}
.p_left10{padding-left:10px;}
.p_left15{padding-left:15px;}
.p_left20{padding-left:20px;}
.p_left30{padding-left:30px;}
.p_left50{padding-left:50px;}
.p_left100{padding-left:100px;}
.p_right5{padding-right:5px;}
.p_right10{padding-right:10px;}
.p_right15{padding-right:15px;}
.p_right20{padding-right:20px;}
.p_right30{padding-right:30px;}
.p_right50{padding-right:50px;}
.p_right100{padding-right:100px;}

重新整理base.css 标签见名知意

时间: 2024-07-29 11:58:44

重新整理base.css 标签见名知意的相关文章

整理base.css,重设浏览器样式

有的时候,可以把自己经常写的代码整理一下,分文别类,用的时候,拿过来直接用就可以了,可以节约很多时间,提高工作效率.所以,每个人都要有自己的代码库.点击下载 1 /* 2 * @Author: liubeimeng 3 * @Date: 2015-11-11 10:22:02 4 * @Last Modified by: liubeimeng 5 * @Last Modified time: 2015-11-11 10:33:18 6 * @名称:base.css 7 * @功能:1.重设浏览器

css之去除html标签默认的外边距margin和内边距padding,通用工具类 base.css

@charset "utf-8"; /*! * @名称:base.css * @功能:1.重设浏览器默认样式 * 2.设置通用原子类 */ /* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */ html { background:white; color:black; } /* 内外边距通常让各个浏览器样式的表现位置不同 */ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,le

我大哥整理的 html标签SEO规范

1.<!--页面注解-->2.<html>3.<head> 4.<meta http-equiv="Content-Type" content="text/html; charset=gb2312">5.<meta http-equiv=Content-Language content=zh-cn>6.<title>页面标题</title> 7.<meta name="

(转)我的 css 框架——base.css

原文链接:http://www.cnblogs.com/yjzhu/archive/2012/11/05/2755095.html@charset "utf-8"; /*! * @名称:base.css * @功能:1.重设浏览器默认样式 * 2.设置通用原子类 */ /* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */ html { background:white; color:black; } /* 内外边距通常让各个浏览器样式的表现位置不同 */ body,

css标签选择器

<!doctype html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus?"> <meta name="Author" content=""> <meta name="K

base.css

1 @charset "utf-8"; 2 /*! 3 * @名称:base.css 4 * @功能:1.重设浏览器默认样式 5 * 2.设置通用原子类 6 */ 7 /* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */ 8 html { 9 background:white; 10 color:black; 11 } 12 /* 内外边距通常让各个浏览器样式的表现位置不同 */ 13 body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h

CSS标签内多余内容隐藏

CSS: 1 <style> 2 .mazey{width:100px;} 3 .nowrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} 4 </style> HTML: 1 <div class="mazey nowrap">http://www.mazey.net/baby/blog/#http://www.mazey.net/baby/blog/#http://www

页面样式base.css

[color=rgb(0, 0, 0)][color=rgb(70, 70, 70)]第一次发笔记,下面是我用过多次的base.css.欢迎各种建议吐槽.大家共同进步{:4_173:}[color=rgb(0, 0, 0)][color=rgb(70, 70, 70)] [color=rgb(0, 0, 0)][color=rgb(70, 70, 70)]书上看到的:[color=rgb(0, 0, 0)][color=rgb(70, 70, 70)]body, div, dl, dt, dd,

CSS标签切换代码

DIV CSS布局实例:CSS标签切换代码 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <