Notes for CSS annotation writing

Source: Internet
Author: User
A small error code will invalidate the style in IE.

# Topnav, # header,. Line,. threecolarea,. twocolarea {
Width: 960px;
Margin: 0 auto;/* uniformly set the outer width */Nonstandard writing
Clear: both;
}

The preceding method causes the IE to display abnormally, And the cause is not found. Adding a space in the comment will display normally.

 

I. annotation writing specifications

1. Line comment:

Directly after the property value, such:

# Topnav, # header,. Line,. threecolarea,. twocolarea {
Width: 960px;
Margin: 0 auto;/* uniformly set the outer width */Note that spaces are left before the text and asterisk (*).
Clear: both;
}

2. comments for the entire segment:

Add comments at the beginning and end, for example:

/* = Search Results = */
. Search {
Border: 1px solid # FFF;
Background: URL (../images/icon.gif) No-repeat #333;
}

/* ===== Search end ===== */

 

For more details, see:
A css writing standard http://www.cnblogs.com/sikeart/archive/2008/06/18/1224544.html

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.