"Go" CSS public style sharing

Source: Internet
Author: User
Tags html comment

Global.css | RESET.CSS (formatted style)
Common.css (common component style)
LAYOUT.CSS (current page style)

Clears the browser default style for all pages in the entire station, ensuring that the initial style is consistent across all browsers.

Common.css (common component style)

Generally a site all the page head, bottom style are consistent, and a long time will not have a big change, the change is probably the product, the operation of the often need to add, remove some of the entrance requirements, to ensure that the entire station all page header once replace the effective, as long as the head file, has the corresponding style, immediately effective, will soon be responding.

such as page flipping, form (input box, button) and other styles are also the whole station unified, put these styles are in the common.css inside, if all the button style to change, a replacement is successful.

LAYOUT.CSS (current page style)

All styles other than public components are written into this style file, and a separate style is guaranteed for a page, and the page HTML and CSS notation are modular to ensure quick response to frequent iterations of the project.

Why to guarantee a page a separate style, and to modular, certainly have friends and I have had the same experience, modify a line of style code, the entire page even n pages will be affected, engaged in a half-day still do not know where the problem, back to the revision before the version, there is no problem. Finally found the reason, but can not change the previous style, but also can not delete, can only increase, time a long, CSS style file more and more large, and finally overwhelmed, the entire page code can only be rewritten.

In fact, GLOBAL.CSS and Common.css can also be merged into a file , after all, formatting style is then dozens of lines of code, and formatting style, head, the bottom style of each page will be used.

This way, each page has only 2 styles:

Common.css
Layout.css
If there are too many components in the common.css, and many components are not commonly used, you can do the following as well:

HEADS.CSS (format language style, head, bottom)
Common.css (common component style)
LAYOUT.CSS (current page style)
In general there are only 2 styles, and there are not too many problems when you need to use components to link component styles.

Finally, do not put anything into the component style inside the plug, there is writing would rather each page repeat copy and do not plug into the component style inside. One day, you'll find that this component is too big to be scary and a lot of useless.

/*********** generic Basic class 1************//* formatting style */body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input, TEXTAREA,P,BLOCKQUOTE,TH,TD {margin:0;padding:0;} table {border-collapse:collapse;border-spacing:0;} fieldset,img { border:0} address,caption,cite,code,dfn,em,strong,th,var {Font-style:normal;font-weight:normal} ol,ul {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: ' } abbr,acronym {border:0}/* text layout, color */.f12{font-size:12px}.f13{font-size:13px}.f14{font-size:14px}.f16{font-size : 16px}.f20{font-size:20px}.fb{font-weight:bold}.fn{font-weight:normal}.t2{text-indent:2em}.red,a.red{color:# Cc0031}.darkblue,a.darkblue{color: #039}.gray,a.gray{color: #878787}.lh150{line-height:150%}.lh180{line-height : 180%}.lh200{line-height:200%}.unl{text-decoration:underline;}. No_unl{text-decoration:none;} /* Locate */.tl{text-align:left}.tc{text-align:center}.tr{text-align:right}.fl{float:left;display:inline}.fr{float: Right;display:inlIne}.cb{clear:both}.cl{clear:left}.cr{clear:right}.vm{vertical-align:middle}. pr{position:relative}. Pa{position : Absolute}.abs-right{position:absolute;right:0}.zoom{zoom:1}. Hidden{visibility:hidden}. none{display:none}/* Length Height */.w10{width:10px}.w20{width:20px}.w50{width:50px}.w90{width:90px}.w100{width:100px}.w200{width:200px}. w250{width:250px}.w500{width:500px}.w800{width:800px}.w{width:100%}.h50{height:50px}.h80{height:80px}.h100{ height:100px}.h200{height:200px}.h{height:100%}/* margin */.m10{margin:10px}.m15{margin:15px}.m30{margin:30px}.mt5{ margin-top:5px}.mt10{margin-top:10px}.mt15{margin-top:15px}.mt50{margin-top:50px}.mt100{margin-top:100px}.mb5{ margin-bottom:5px}.mb10{margin-bottom:10px}.mb15{margin-bottom:15px}.mb100{margin-bottom:100px}.ml5{ margin-left:5px}.ml10{margin-left:10px}.ml15{margin-left:15px}.ml20{margin-left:20px}.ml30{margin-left:30px}. ml50{margin-left:50px}.ml100{margin-left:100px}.mr5{margin-right:5px}.mr10{margin-right:10px}.mr15{ Margin-right:15px}.mr50{margin-right:50px}.mr100{margin-right:100px}.p10{padding:10px;}. p15{padding:15px;}. p30{padding:30px;}. Pt5{padding-top:5px}.pt10{padding-top:10px}.pt15{padding-top:15px}.pt20{padding-top:20px}.pt30{padding-top : 30px}.pt50{padding-top:50px}.pb5{padding-bottom:5px}.pb100{padding-bottom:100px}.pl5{padding-left:5px}.pl10{ Padding-left:10px}.pl50{padding-left:50px}.pl100{padding-left:100px}.pr5{padding-right:5px}.pr10{padding-right : 10px}.pr15{padding-right:15px}.pr100{padding-right:100px}/*********** general Basic class 2************//* Copyright 2008 Tsxmlove. All rights Reserved. */* {padding:0px;margin:0px;text-align:left;font-family:arial, Verdana, Tahoma, "Song-Body", Helvetica, Sans-serif; line-height:150%;} Body {font-size:14px;text-align:center;color: #000000; Background-color: #DEEBF3; Background-image:url (.. /images/body_bg.jpg); background-repeat:repeat-x;} Table {border-collapse:collapse;} td {PADDING:3PX;} img {border:none;} input {padding:1px;vertical-align:middle;line-height:normal;}. Main-box {Margin-right:autO;margin-left:auto;width:960px;clear:both;zoom:1;overflow:hidden;background-color: #CCCCCC;}. Text-overflow-hidden {White-space:nowrap;word-spacing:normal;letter-spacing:normal;overflow:hidden;}. Box-align-center {Margin-right:auto;margin-left:auto;} /*CSS defines a hyperlink four states are also in order. */a:link, a:visited {text-decoration:none;color: #1F376D;} A:hover, a:active {text-decoration:underline;color: #BD0A01; border:none;} /* The above statement defines the style of links, visited links, mouse over, mouse down, respectively. Note that you must write in the order above, otherwise the display may not be the same as you expected. Remember that their order is "LVHA". */ul {clear:both;overflow:hidden;width:100%;} UL, Li {list-style:none;}. valign {display:table-cell;*display:inline;zoom:1;vertical-align:middle;}. Text{word-wrap:break-word;overflow:hidden;word-break:break-all;} /*======================CSS Vertical Center =======================*/.holder {width:740px;height:300px;border:1px solid #777; Text-align:center;display:table-cell;vertical-align:middle;} /* The following styles are for Ie*/.edge {width:0;height:100%;d isplay:inline-block;vertical-align:middle;}. container {Vertical-align:middle;displaY:inline-block;} /*===============================================*//*css Hack*/.class {background-color: #FFFF00;/* All Browsers */* Background-color: #00FF00;/*ie*/_background-color: #00FFFF;/*ie6*/}/*====== Universal float closed ======*/.clear:after {content    : ".";    Display:block;    height:0;    Clear:both;    Visibility:hidden; }.clear {display:inline-block;}/* for Ie/mac *//*<!--main stylesheet ends, CC with new stylesheet below ... -*/.clear {zoom:1;     /* Triggers haslayout */display:block; /* Resets display for Ie/win */}/* Only IE can see inside the conditional comment and read this CSS rule. Don ' t ever use a normal HTML comment inside the CC or it'll close prematurely.         *//*====== Universal float closed 2======*/.overflow-hidden{overflow:hidden;}      /* Control background overflow */.equal-height{margin-bottom:-32800px;padding-bottom:32800px;} /* Control height sufficiently small *//*====== universal float closed 3======*/.clear {height:0px; clear:both; font-size:0px; line-height:0px; zoom:1;}

"Go" CSS public style sharing

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.