inicio mail me! sindicaci;ón

CSS annotate, name, the brief summary of the CSS skill such as sort of inheritance, style

One, about annotate

When founding Xhtml CSS website, the explanatory note in CSS is very essential. When establishing CSS pattern, ought to hold the convention of conveniently annotate. General, the format that I am used to using */” of “/* annotate content will write explanatory note, because be in the EditPlus editor that has tall bright function, the annotate of the commonly used “/***************/” and so on in use C language is insignificant, many without necessary fill insignificant content serves as space. The documentation that contains explanatory note regards the primitive CSS of the website as documentation, when releasing a website, can use CSS to compress a tool to compress CSS, efficiency is transmitted in order to raise a file in annotate of the take out in the CSS of output.

2, about naming

When naming to CSS file, I am preferred use the English name that accords with semantics or abbreviate names, in be not commonly used part to perhaps can use partial phoneticize to name. Additional, be in certain in the Class that has appurtenant concern, I may use similar “list_banner” and so on name, namely father masurium adds “_” plus masurium.

About naming, can undertake negotiation according to the habit of group stylist. But explanatory note had better be added after name, so that make documentation for future reference in the future.

3, about inheritance

In CSS, want be apt to to use inheritance. It is for instance in the Div of two nest, father element defined Background-color attribute to be black, if the setting of fruit element is black together, do not need to repeat a definition. The inheritance that is good at using CSS can make code more effective, more compact.

4, the arrangement that defines about CSS

When the Class in defining CSS, the proposal uses distinct means to describe a statement.

Structure of give typical examples:

It is quotative content below:
<div Id= "menu" >
<div Class= "menulist" >
<div Class= "selectit" ></div>
</div>
</div>

CSS of give typical examples:

It is quotative content below:
#menu {. . . }
#menu.menulist {. . . }
#menu.menulist.selectit {. . . }

Going up in the exemple, from the point of final result, #menu was not necessary to repeat appear, but if can be in front,add #menu actually, the administrative levels that will let documentation is more clear, more benefit at reading.

5, about modal sort

When design CSS style is expressed, we are handwritten code mostly, the modal sort in causing Class very easily so is confused. The type such as Padding, Margin, Background, Color was used in having a few Class for instance, but sort when, some Class are Background before leaning quite, before having a plenty of Margin to lean quite. Caused certain disorder so, let be thwarted of train of thought easily. My proposal individual or the stylist agreement of the group roughly ordinal, such from individual for do not look to give too big difference, but from integral admiral more be read easily and manage, integral efficiency can rise many.

For instance, I acquiesce to wait for Width, Height and Padding, Margin, Border put in relatively the position before leaning, background next, it is the Font that controls text version, Color, Text-align next, it is the element that ability of certain and special label uses then, wait like List-style, finally is Css filter lens. When should encountering special situation (for instance the first step of CSS certain property needs a definition) OK and agile processing.

Bookmark:Digg Del.icio.us Reddit

Leave a Comment