CSS coding style

1.3 CSS coding style

Here's writing style is in line with the actual development of the way of writing, not mandatory norms.

1. style style

1. Writing style format:

Compact

h2 {color:red;font-size:26px;}

 

Expanded format

h2{color:red;
font-size:26px;
}

Strongly recommended expanded format, because more intuitive, more convenient when modifying

2. Style size style

2. Writing Style Size:

lowercase

h2 {
color:red;
  }

 

Capital letter

H2 {
COLOR:RED;
  }

Strongly recommended style selector, attribute names, attribute keyword all lowercase letters, easy to write, browse, except in exceptional circumstances

3. Style Space Style

3. Space specification

H2 (space) { 
Color :( space) Red;
}

Select (tags) and the retention braces intermediate spaces.

Attribute value of the front, a colon, a space reserved

Guess you like

Origin www.cnblogs.com/GZ1215-228513-Chichy/p/12232106.html