CSS naming conventions (rules) worth collecting Commonly used CSS naming rules

CSS naming conventions (rules) worth collecting Commonly used CSS naming rules

CSS naming conventions (rules) Commonly used CSS naming rules

Header: header
Content: content/container
footer
Navigation: nav
Sidebar: sidebar
Column: column
The page periphery controls the overall layout width: wrapper
Left right center
Login bar: loginbar
Logo: logo
Advertisement: banner
Page body: main
Hot spot: hot
News: news
Download: download
Sub-navigation: subnav
Menu: menu
Submenu: submenu
Search: search
Friend link: friendlink
Footer: footer
Copyright: copyright
Scroll: scroll
Content: content
Tags: tags
Article list: list
Prompt message: msg
Tips:
Column title: title
Join: joinus
Guide: guide
Service: service
Registration: regsiter
Status: status
Voting: vote
Partner: partner

How to write comments:
/* Header */
Content Area
/* End Header */

Id naming:

1) Page structure

container
Header: header
Content: content/container
Page body: main
Footer: footer
Navigation: nav
Sidebar: sidebar
Column: column
The page periphery controls the overall layout width: wrapper
Left right center

(2) Navigation

Navigation: nav
Main navigation: mainnav
Sub-navigation: subnav
Top navigation: topnav
Side navigation: sidebar
Left navigation: leftsidebar
Right navigation: rightsidebar
Menu: menu
Submenu: submenu
Title: title
summary: summary

(3) Function

Logo: logo
Advertisement: banner
Login: login
Login bar: loginbar
Register: register
Search: search
Functional area: shop
Title: title
Join: joinus
Status: status
Button: btn
Scroll: scroll
Tab: tab
Article list: list
Prompt message: msg
current: current
Tips:
Icon: icon
Note:
Guide: guild
Service: service
Hot spot: hot
News: news
Download: download
Voting: vote
Partner: partner
Friendly links: link
Copyright: copyright

Note::

1. All lowercase;
2. Use English as much as possible;
3. No horizontal or underline;
4. Try not to abbreviate unless the word is clear at first glance.

CSS style sheet file naming

Main master.css
module.css
Basic shared base.css
Layout, layout layout.css
themethemes.css
columns.css
textfont.css
forms.css
Patch mend.css
Printprint.css

Summarize

The above is the CSS naming specifications (rules) and commonly used CSS naming rules introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

<<:  mysql5.7 remote access settings

>>:  IE8 Developer Tools Menu Explanation

Recommend

The principles and defects of MySQL full-text indexing

MySQL full-text index is a special index that gen...

How to implement web page compression in Nginx optimization service

Configure web page compression to save resources ...

CSS to achieve floating customer service effect

<div class="sideBar"> <div>...

MySQL5.7 single instance self-starting service configuration process

1.MySQL version [root@clq system]# mysql -v Welco...

In-depth understanding of Vue transition and animation

1. When inserting, updating, or removing DOM elem...

JavaScript to implement the web version of the snake game

This article shares the specific code for JavaScr...

Web designers should optimize web pages from three aspects

<br />With the increase of bandwidth, there ...

CentOS 6.5 installation mysql5.7 tutorial

1. New Features MySQL 5.7 is an exciting mileston...

Solve the margin: top collapse problem in CCS

The HTML structure is as follows: The CCS structu...

Detailed tutorial on compiling and installing MySQL 5.7.24 on CentOS7

Table of contents Install Dependencies Install bo...

Detailed analysis of the MySQL slow log opening method and storage format

In development projects, we can monitor SQL with ...

Detailed explanation of overflow-scrolling to solve scrolling lag problem

Preface If you use the overflow: scroll attribute...

Html comments Symbols for marking text comments in Html

HTML comments, we often need to make some HTML co...

Overview of the basic components of HTML web pages

<br />The information on web pages is mainly...

WeChat Mini Program Basic Tutorial: Use of Echart

Preface Let’s take a look at the final effect fir...