Some of the order of CSS and naming conventions

Source: Internet
Author: User

For the writing order of CSS

1. Location properties: (e.g. position,top,right,z-index,display,float, etc.)

2. Size: (Width,height,padding,margin)

3. Text series: Font,line-height, Letter-spacing,color-text-align

4. Background: Background,border

5. Other: Animation,transition

For writing Specifications:

1. Use CSS abbreviation properties, such as for Padding,margin,font properties

2. Remove the 0 in front of the decimal as Font-size:.8em

3. Abbreviated name (but for example, to ensure its semantics)

4.16 binary colors can be abbreviated with abbreviated code, such as #ffee00, written in #fe0

5. The hyphen CSS selector is named with an underscore--not underlined _, because the underscore requires a more pressing shift

Naming conventions for CSS:

Head: Header content: Content/container tail footer

Navigation: Nav Sidebar: Sidebar column: Column

Page perimeter control overall layout width: Wrapper

Middle: Left Right Center login bar: Loginbar Logo: Logo thumbnail: Thumbnail ad: Banner

Page theme: Main hot: News download: Download sub-navigation: Subnav Menus: Menu

Submenu: Submenu Search: Searching Links: Friendlink footer: Footer Copyrights: Copyright Scroll: Scroll

Content: Contents Tags: Tag article list: Listing tips: Msg tips: Tips column title: add: Joinus

Guideline: Guide Services: Service registration: Register Status: status vote: Vote partner: Partner

Abstract: summary Note: note

CSS style sheet file naming

Main: Master.css module MODULE.CSS Basic common base.css layout, layout layout.css

Topic: THEMES.CSS Column: columns.css text: font.css form forms.css Patch: MEND.CSS

Printed: Print.css

Some of the order of CSS and naming conventions

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.