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

How to load third-party component libraries on demand in Vue3

Preface Take Element Plus as an example to config...

Use HTML and CSS to create your own warm man "Dabai"

The final result is like this, isn’t it cute… PS:...

Image scrolling effect made with CSS3

Achieve resultsImplementation Code html <base ...

How to add Tomcat Server configuration to Eclipse

1. Window -> preferences to open the eclipse p...

Uninstalling MySQL database under Linux

How to uninstall MySQL database under Linux? The ...

MySQL 8.0.15 version installation tutorial connect to Navicat.list

The pitfalls 1. Many tutorials on the Internet wr...

The principle and basic use of Vue.use() in Vue

Table of contents Preface 1. Understanding with e...

In-depth understanding of the use of the infer keyword in typescript

Table of contents infer Case: Deepen your underst...

How to install JDK and Mysql on Ubuntu 18.04 Linux system

Platform deployment 1. Install JDK step1. Downloa...

Vue implements interface sliding effect

This article example shares the specific code of ...

HTML tag dl dt dd usage instructions

Basic structure: Copy code The code is as follows:...

Summary of the use of Datetime and Timestamp in MySQL

Table of contents 1. How to represent the current...