Streamlined web site reset and CSS Common style Gallery

Source: Internet
Author: User

First, CSS Reset

body{
line-height:1.4;
Color: #333;
font-family:arial;
font-size:12px;
}
input,textarea,select{
font-size:100%;
Font-family:inherit;
}
body,h1,h2,h3,h4,h5,h6,p,ul,ol,form{
margin:0;
}
h4,h5,h6{
Font-size:1em;
}
ul,ol{
padding-left:0;
List-style-type:none;
}
/*image with no-border*/
img{border:0;}

Second, CSS common style library

The CSS Universal style library is the CSS style library that can be used on any Web site.

/*---------------------Single CSS-----------------------*/
/* Display */
. Dn{display:none;}
. Di{display:inline;}
. Db{display:block;}
. Dib{display:inline-block,}/* If the element is a block level (eg. Div, Li), using ' inline_any ' instead */
/* Height */
. h14{height:14px;}
. h16{height:16px;}
. h18{height:18px;}
. h20{height:20px;}
. h22{height:22px;}
. h24{height:24px;}
/* Width */
/* Fixed width value */
. w20{width:20px;}
. w50{width:50px;}
. w70{width:70px;}
. w100{width:100px;}
. w120{width:120px;}
. w140{width:140px;}
. w160{width:160px;}
. w180{width:180px;}
. w200{width:200px;}
. w220{width:220px;}
. w250{width:250px;}
. w280{width:280px;}
. w300{width:280px;}
. w320{width:320px;}
. w360{width:360px;}
. w400{width:400px;}
. w460{width:460px;}
. w500{width:500px;}
. w600{width:600px;}
. w640{width:640px;}
. w700{width:700px;}
/* percent Width value */
. pct10{width:10%;}
. pct15{width:15%;}
. pct20{width:20%;}
. pct25{width:25%;}
. pct30{width:30%;}
. pct33{width:33.3%;}
. pct40{width:40%;}
. pct50{width:50%;}
. pct60{width:60%;}
. pct66{width:66.6%;}
. pct70{width:70%;}
. pct75{width:75%;}
. pct80{width:80%;}
. pct90{width:90%;}
. pct100{width:100%;}
/* Line-height */
. lh14{line-height:14px;}
. lh16{line-height:16px;}
. lh18{line-height:18px;}
. lh20{line-height:20px;}
. lh22{line-height:22px;}
. lh24{line-height:24px;}
/* Margin */
. m0{margin:0;}
. ml1{margin-left:1px;}
. ml2{margin-left:2px;}
. ml5{margin-left:5px;}
. ml10{margin-left:10px;}
. ml15{margin-left:15px;}
. ml20{margin-left:20px;}
. ml30{margin-left:30px;}
. mr1{margin-right:1px;}
. mr2{margin-right:2px;}
. mr5{margin-right:5px;}
. mr10{margin-right:10px;}
. mr15{margin-right:15px;}
. mr20{margin-right:20px;}
. mr30{margin-right:30px;}
. mt1{margin-top:1px;}
. mt2{margin-top:2px;}
. mt5{margin-top:5px;}
. mt10{margin-top:10px;}
. mt15{margin-top:15px;}
. mt20{margin-top:20px;}
. mt30{margin-top:30px;}
. mb1{margin-bottom:1px;}
. mb2{margin-bottom:2px;}
. mb5{margin-bottom:5px;}
. mb10{margin-bottom:10px;}
. mb15{margin-bottom:15px;}
. mb20{margin-bottom:20px;}
. mb30{margin-bottom:30px;}
/* Margin Negative */
. ml-1{margin-left:-1px;}
. mr-1{margin-right:-1px;}
. mt-1{margin-top:-1px;}
. mb-1{margin-bottom:-1px;}
. ml-3{margin-left:-3px;}
. mr-3{margin-right:-3px;}
. mt-3{margin-top:-3px;}
. mb-3{margin-bottom:-3px;}
. ml-20{margin-left:-20px;}
. mr-20{margin-right:-20px;}
. mt-20{margin-top:-20px;}
. mb-20{margin-bottom:-20px;}
/* padding */
. p0{padding:0;}
. p1{padding:1px;}
. pl1{padding-left:1px;}
. pt1{padding-top:1px;}
. pr1{padding-right:1px;}
. pb1{padding-bottom:1px;}
. p2{padding:2px;}
. pl2{padding-left:2px;}
. pt2{padding-top:2px;}
. pr2{padding-right:2px;}
. pb2{padding-bottom:2px;}
. pl5{padding-left:5px;}
. p5{padding:5px;}
. pt5{padding-top:5px;}
. pr5{padding-right:5px;}
. pb5{padding-bottom:5px;}
. p10{padding:10px;}
. pl10{padding-left:10px;}
. pt10{padding-top:10px;}
. pr10{padding-right:10px;}
. pb10{padding-bottom:10px;}
. p15{padding:15px;}
. pl15{padding-left:15px;}
. pt15{padding-top:15px;}
. pr15{padding-right:15px;}
. pb15{padding-bottom:15px;}
. p20{padding:20px;}
. pl20{padding-left:20px;}
. pt20{padding-top:20px;}
. pr20{padding-right:20px;}
. pb20{padding-bottom:20px;}
. p30{padding:30px;}
. pl30{padding-left:30px;}
. pt30{padding-top:30px;}
. pr30{padding-right:30px;}
. pb30{padding-bottom:30px;}
/* Border-color name Rule:border (b)-position (l/r/t/b/d)-width (NULL/2)-style (null/sh)-color (first one Letter/first |-> all colors is safe color*/
. bdc{border:1px solid #ccc;}
. blc{border-left:1px solid #ccc;}
. brc{border-right:1px solid #ccc;}
. btc{border-top:1px solid #ccc;}
. bbc{border-bottom:1px solid #ccc;}
. bdd{border:1px solid #ddd;}
. bld{border-left:1px solid #ddd;}
. brd{border-right:1px solid #ddd;}
. btd{border-top:1px solid #ddd;}
. bbd{border-bottom:1px solid #ddd;}
. bde{border:1px solid #eee;}
. ble{border-left:1px solid #eee;}
. bre{border-right:1px solid #eee;}
. bte{border-top:1px solid #eee;}
. bbe{border-bottom:1px solid #eee;}
/* Background-color name RULE:BG-(key Word/hex color) |-> All colors is safe color */
. Bgwh{background-color: #fff;}
. Bgfb{background-color: #fbfbfb;}
. Bgf5{background-color: #f5f5f5;}
. Bgf0{background-color: #f0f0f0;}
. Bgeb{background-color: #ebebeb;}
. Bge0{background-color: #e0e0e0;}
/* Safe Color */
. G0{color: #000;}
. G3{color: #333;}
. G6{color: #666;}
. G9{color: #999;}
. Gc{color: #ccc;}
. Wh{color:white;}
/* Font-size */
. f0{font-size:0;}
. f10{font-size:10px;}
. f12{font-size:12px;}
. f13{font-size:13px;}
. f14{font-size:14px;}
. f16{font-size:16px;}
. f18{font-size:18px;}
. f20{font-size:20px;}
. f24{font-size:24px;}
/* font-family */
. fa{font-family:arial;}
. Ft{font-family:tahoma;}
. Fv{font-family:verdana;}
. Fs{font-family:simsun;}
. fl{font-family: ' Lucida Console ';}
. fw{font-family: ' Microsoft Yahei ';}
/* Font-style */
. n{font-weight:normal; font-style:normal;}
. B{font-weight:bold;}
. I{font-style:italic;}
/* Text-align */
. Tc{text-align:center;}
. Tr{text-align:right;}
. Tl{text-align:left;}
. tj{text-align:justify;}
/* Text-decoration */
. Tdl{text-decoration:underline;}
. Tdn,.tdn:hover,.tdn A:hover,a.tdl:hover{text-decoration:none;}
/* letter-spacing */
. lt-1{letter-spacing:-1px;}
. lt0{letter-spacing:0;}
. lt1{letter-spacing:1px;}
/* White-space */
. Nowrap{white-space:nowrap;}
/* Word-wrap */
. Bk{word-wrap:break-word;}
/* Vertical-align */
. Vm{vertical-align:middle;}
. Vtb{vertical-align:text-bottom;}
. Vb{vertical-align:bottom;}
. Vt{vertical-align:top;}
. vn{vertical-align:-2px;}
/* FLOAT */
. L{float:left;}
. R{float:right;}
/* Clear */
. Cl{clear:both;}
/* Position */
. rel{position:relative;}
. Abs{position:absolute;}
/*z-index*/
. Zx1{z-index:1;}
. Zx2{z-index:2;}
/* CURSOR */
. Poi{cursor:pointer;}
. Def{cursor:default;}
/* Overflow */
. Ovh{overflow:hidden;}
. Ova{overflow:auto;}
/* Visibility */
. Vh{visibility:hidden;}
. vv{visibility:visible;}
/* Zoom */
. Z{*zoom:1;}


/*-------------------Multiply CSS------------------*/
/* block element horizontally centered */
. Auto{margin-left:auto; Margin-right:auto;}
/* Clear FLOAT */
. Fix{*zoom:1;}
. fix:after{display:table; content: '; clear:both;}
/* Adaptive layout based on Display:table-cell */
Cell{display:table-cell; *display:inline-block; width:2000px; *width:auto;}
/* Double-column Adaptive Cell section continuous English character wrap */
cell_bk{display:table; width:100%; table-layout:fixed; word-wrap:break-word;}
/* Single-line text overflow virtual dot display */
. ell{text-overflow:ellipsis; white-space:nowrap; overflow:hidden;}
/* CSS3 Transition animation effect */
. trans{
-webkit-transition:all 0.3s;
Transition:all 0.3s;
}
/* Size Indefinite element Vertical Center */
Dib_vm{display:inline-block; width:0; height:100%; vertical-align:middle;}
/* Load in background image-If you use this CSS library, be sure to modify this image address */
. Loading{background:url (http://www.zhangxinxu.com/study/image/loading.gif) no-repeat Center;}
/* Box text box text field */
. bd_none{border:0; outline:none;}
/* Absolute positioning hidden */
. abs_out{position:absolute; left:-999em; top:-999em;}
. Abs_clip{position:absolute; Clip:rect (0 0 0 0);}
/* Button Disabled */
. Disabled{color: #acacac!important; Border-color: #acacac!important; text-shadow:1px 1px #fff!important; outline:0! Important Cursor:default!important; Pointer-events:none;}
. Disabled:hover{text-decoration:none!important;}
Wide list of/*inline-block and float * *
. inline_box{font-size:1em; letter-spacing:-.25em; font-family:arial;}
. Inline_two,. Inline_three,. Inline_four,. inline_five,. Inline_six,. Inline_any{display:inline-block; *display: Inline letter-spacing:0; Vertical-align:top; *zoom:1;}
. Float_two,. Float_three,. Float_four,. float_five,. Float_six{float:left;
. Inline_two,. float_two{width:49.9%;}
. Inline_three,. float_three{width:33.3%;}
. Inline_four,. float_four{width:24.9%;}
. inline_five,. float_five{width:19.9%;}
. Inline_six,. float_six{width:16.6%;}
Inline_fix{display:inline-block; width:100%; height:0; overflow:hidden;}

Original link: http://www.zhangxinxu.com/wordpress/?p=944

Streamlined web site reset and CSS Common style Gallery

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.