Common CSS Naming conventions
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 Strip: Loginbar
Logo: Logo
Ad: Banner
Page body: Main
Hotspot: Hot
Press: News
Download: Download
Sub-navigation: Subnav
Menus: Menu
Sub-menu: submenu
Searches: Search
Links: Friendlink
Footer: Footer
Copyrights: Copyright
Scrolling: Scroll
Contents: Content
Tabs page: Tab
Article List: List
Hint Message: MSG
Tip: Tips
Column Title: Title
Join: Joinus
Guide: Guides
Services: Service
Registration: Register
State: Status
Vote: Vote
PARTNER: Partner
(b) The wording of the note:
/* Header */内容区/* End Header */
(c) The name of the ID:
(1) Page structure
Container: Container
Page Header: Header
Content: Content/container
Page body: Main
Page End: Footer
Navigation: Nav
Sidebar: Sidebar
Column: Column
Page perimeter control overall layout width: Wrapper
Middle: Left Right center
(2) Navigation
Navigation: Nav
Main navigation: MAINBAV
Sub-navigation: Subnav
Top Navigation: Topnav
Side navigation: Sidebar
Left navigation: Leftsidebar
Right navigation: Rightsidebar
Menus: Menu
Sub-menu: submenu
Caption: Title
Abstract: Summary
(3) function
Logo: Logo
Ad: Banner
Login: Login
Login Strip: Loginbar
Registration: Register
Searches: Search
Functional area: Shop (e.g. shopping cart)
Caption: Title
Join: Joinus
State: Status
Button: BTN
Scrolling: Scroll
Tabs page: Tab
Article List: List
Hint Message: MSG
Present: Current
Tip: Tips
Icons: Icon
Note: note
Guide: Guides
Services: Service
Hotspot: Hot
Press: News
Download: Download
Vote: Vote
PARTNER: Partner
Links: Link
Copyrights: Copyright
(d) Name of class:
(1) Color: Use the name of the color or the 16 code, as shown in
.red { color: red; }.f60 { color: #f60; }.ff8600 { color: #ff8600; }
(2) Font size, directly using "font+ font size" as the name, as
.font10px { font-size: 10px; }.font6pt {font-size: 6pt; }
(3) Alignment style, using the English name of the alignment target, such as
.left { float:left; }.bottom { float:bottom; }
(4) title bar style, named using "Category + function", as
.barnews { }.barproduct { }
Precautions::
- All lowercase;
- try to use English;
- Do not add the middle bar and underline;
- Try not to abbreviate;
I prefer the simple and elegant style of bootstrap. So CSS naming can also refer to.
Attached original address: http://www.cnblogs.com/WebShare-hilda/p/4686067.html
"Go" common CSS naming conventions