CSS your HTML partner ! !

CSS your HTML partner! !

Click here to visit Our forum here!

Tuesday, February 8, 2011

CSS 3 Kind Of General Name Rules

Explained the CSS standardization name in detail three kinds of general name rules
Camel nomenclature:


Such that just like its name expressed that refers to the mix using the big lowercase letter to constitute the variable and function name. For example, below uses the camel nomenclature separately and under the same function of lineation law name:
printEmployeePaychecks();
print_employee_paychecks();

The first function name used the camel nomenclature, each logical break point capital letter in function name has marked; The second function name used under the lineation law, each logical break point underline in function name has marked.

The camel nomenclature was getting more and more popular in recent years, in new functional library and in Microsoft Windows such environment, it uses quite many. On the other hand, after getting down the lineation law is c appears, starts to be popular, in the old procedure and in UNIX such environment, its use is common.
Hungarian nomenclature:

Widely applies in like the Microsoft Windows environment. Variable that in the Windows programming uses (also including great) the name rule Hungary nomenclature, this name technology (Charles Simonyi) was proposed by a competent Microsoft programmer Charles Simone.

The Hungarian nomenclature through adds on mark marking of corresponding lowercase letter to take the prefix in front of the variable name, marks the variable the function territory, the type and so on. These marks may many also use, the order is first m_ (member variable), then indicator, then simple data type, then other.
For example: m_lpszStr, indicated that aims at one by 0 character endings string of character long indicator member variable.

The Hungarian nomenclature key is: The identifier name takes the prefix by one or many lowercase letter openings; After the prefix what is first letter capital letter words or many words combines, this word must indicate the variable the use.

Pascal (pascal) nomenclature:
Similar to the camel nomenclature. But the camel nomenclature is the first letter small letter, but Pascal nomenclature is the first letter capital letter, for example:
DisplayInfo();
string UserName;

The two have used Pascal nomenclature. In C#, is in the majority by Pascal nomenclature and camel nomenclature.

Three kinds of name rules subtotals:
MyData is the demonstration that a Pascal names
But myData is a camel nomenclature, its first word first letter small letter, following word first letter capital letter, a looking like elephant camel

But iMyData is a Hungarian nomenclature, its small letter i explained its state, following and Pascal names same, has instructed this variable use.
The CSS style has solved a universal problem

The HTML label was designed to be used to define the documents content. Through using <h1>, such label, the original intention of HTML is expression “this is title” and “this is paragraph” and “this is form” and so on information. But the documents layout hopes that completes through the browser, but does not use any formatted label.

Because two kinds of main browsers (Netscape and Internet Explorer) unceasingly (for example typeface label and color attribute) increases the new HTML label and attribute to the HTML standard, founds the documents content clearly independence becomes in the documents performance level stand more and more difficult.
In order to solve this problem, the World Wide Web Consortium (W3C), the standardized alliance of this non-profit, shouldered the mission of HTML standardization, and outside 4.0 created style (Style) in HTML.
All mainstream browsers support the stack-up cascading style sheet.


Reference Link :
3 Kind Of General Name Rules,Retrieved 16 February 2011.

http://baike.baidu.com/view/15916.htm

No comments:

Post a Comment