Solve the problem that the default value of CSS3 transition-delay attribute is 0 without unit and it is invalid

Solve the problem that the default value of CSS3 transition-delay attribute is 0 without unit and it is invalid

Today I would like to share with you the CSS3 transition-delay attribute default value 0 without unit is invalid [problem solved], I hope it can help you.

The transition-delay in CSS3 uses a default value of 0. According to the front-end code specification, it is best to use 0 without any units, such as: margin: 0;padding: 0; etc. instead of padding: 0px; margin: 0px;

So when I used transition-delay, I also used transition-delay: 0; and then problems occurred.

Directly on the picture:

If no unit is specified, the default value is 0.

If no unit is specified, the default value 0 is used.

I checked it over and over for a long time and then began to doubt my life. I don’t know why I added the unit. It actually achieved the effect I wanted.

Add units to the default value of 0

Summary: Actually, the two effects are not a big problem. But in fact there is still a big difference. Because it is an animated effect, I personally think that as long as the movements are regular and not weird, it is acceptable. However, if transition-delay is used in a real project and fails to achieve the desired effect for the user or company, then the loss outweighs the gain. It is unclear whether this will happen with other new properties in CSS3.

This concludes this article on how to solve the problem of CSS3 transition-delay property default value 0 without unit being invalid. For more relevant CSS3 transition-delay property content, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

<<:  How to modify the ssh port number in Centos8 environment

>>:  The difference between div and table in speed, loading, web application, etc.

Recommend

Detailed explanation of three methods of JS interception string

JS provides three methods for intercepting string...

MySQL 8.0.11 installation summary tutorial diagram

Installation environment: CAT /etc/os-release Vie...

CentOS 6 uses Docker to deploy Zookeeper operation example

This article describes how to use docker to deplo...

vite2.x implements on-demand loading of ant-design-vue@next components

1. Use version vite:2.0 ant-design-vue: 2.0.0-rc....

Solution to installing vim in docker container

Table of contents The beginning of the story Inst...

HTML Tutorial: Collection of commonly used HTML tags (4)

Related articles: Beginners learn some HTML tags ...

How to deploy nginx with Docker and modify the configuration file

Deploy nginx with docker, it's so simple Just...

A detailed introduction to JavaScript execution mechanism

Table of contents 1. The concept of process and t...

Vue implements drag and drop or click to upload pictures

This article shares the specific code of Vue to a...

MySQL complete collapse: detailed explanation of query filter conditions

Overview In actual business scenario applications...

How to set underline in HTML? How to underline text in HTML

Underlining in HTML used to be a matter of enclos...

Nginx domain forwarding usage scenario code example

Scenario 1: Due to server restrictions, only one ...

The practical process of login status management in the vuex project

Table of contents tool: Login scenario: practice:...

Summary of various methods of MySQL data recovery

Table of contents 1. Introduction 2. Direct recov...