Do not start CSS pseudo-class names with numbers

Do not start CSS pseudo-class names with numbers

When newbies develop div+css, they need to name the CSS pseudo-class names, such as .ggg, #ccc, and other formats. However, some novices often want to keep things simple when naming CSS pseudo-classes, so they directly use numbers to name them, or name CSS pseudo-class names starting with numbers. This is not allowed.

Newbies should be aware not to name CSS pseudo-classes starting with Arabic numerals, otherwise the browser will not be able to interpret and parse CSS classes named starting with numbers, which will eventually cause incompatibility with similar CSS hack styles, or classes with CSS names starting with numbers will be invalid (the browser cannot interpret them).


Of course, it is okay to use English letters plus numbers to name, but remember that you cannot use numbers plus letters or pure numbers to name CSS selectors. I hope newbies will pay more attention.

<<:  Specific use of CSS front-end page rendering optimization attribute will-change

>>:  An example of the execution order between the href jump and onclick of the html hyperlink a tag

Recommend

Docker Basics

Preface: Docker is an open source application con...

Navicat imports csv data into mysql

This article shares with you how to use Navicat t...

Install Kafka in Linux

Table of contents 1.1 Java environment as a prere...

Solution to ERROR 1054 (42S22) when changing password in MySQL 5.7

I have newly installed MySQL 5.7. When I log in, ...

Introduction to MySQL database performance optimization

Table of contents Why optimize? ? Where to start?...

SpringBoot integrates Activiti7 implementation code

After the official release of Activiti7, it has f...

How to modify port 3389 of Windows server 2008 R2 remote desktop

The default port number of the Windows server rem...

Application of anchor points in HTML

Set Anchor Point <a name="top"><...

Vue mobile terminal determines the direction of finger sliding on the screen

The vue mobile terminal determines the direction ...

A Brief Analysis of Patroni in Docker Containers

Table of contents Create an image File Structure ...

JavaScript canvas Tetris game

Tetris is a very classic little game, and I also ...

Vue.js $refs usage case explanation

Despite props and events, sometimes you still nee...