Share CSS writing standards and order [recommended for everyone to use]

Share CSS writing standards and order [recommended for everyone to use]

CSS writing order

1. Position attributes (position, top, right, z-index, display, float, etc.)

2. Size (width, height, padding, margin)

3. Text family (font, line-height, letter-spacing, color- text-align, etc.)

4. Background (background, border, etc.)

5. Others (animation, transition, etc.)

CSS Writing Standards

Using CSS Shorthand Properties

Some CSS properties can be abbreviated, such as padding, margin, font, etc. This can simplify the code and improve the user's reading experience.

Remove the "0" before the decimal point

Summarize

The above is the CSS writing standards and order that I introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

<<:  Deepin20.1 system installs MySQL8.0.23 (super detailed MySQL8 installation tutorial)

>>:  Simple example of adding and removing HTML nodes

Recommend

How to build YUM in Centos7 environment

1. Enter the configuration file of the yum source...

Detailed explanation of the definition and function of delimiter in MySQL

When you first learn MySQL, you may not understan...

TABLE tags (TAGS) detailed introduction

Basic syntax of the table <table>...</tab...

How to use Typescript to encapsulate local storage

Table of contents Preface Local storage usage sce...

Detailed explanation of for loop and double for loop in JavaScript

for loop The for loop loops through the elements ...

How to implement MySQL bidirectional backup

MySQL bidirectional backup is also called master-...

How to extend Vue Router links in Vue 3

Preface The <router-link> tag is a great to...

MySQL SQL statement analysis and query optimization detailed explanation

How to obtain SQL statements with performance iss...

How to insert Emoji expressions into MySQL

Preface Today, when I was designing a feedback fo...

How to install Oracle_11g using Docker

Install Oracle_11g with Docker 1. Pull the oracle...

How to uninstall MySQL 8.0 version under Linux

1. Shut down MySQL [root@localhost /]# service my...

CSS3 timeline animation

Achieve results html <h2>CSS3 Timeline</...

vue+ts realizes the effect of element mouse drag

This article example shares the specific code of ...