Importance of background color declaration when writing styles

Importance of background color declaration when writing styles
As the title says, otherwise when the page is revised, the following situation may occur:

I am currently working on a revision project to revamp the old page, including changing the white page background to light gray. After the change, the above situation occurred. Because in the above module, the default background color transparent is used, and the background-color of the body was #FFF before, the display effect is in line with the design intention. But when the background color of the body is changed this time, the display is wrong. (The picture may not be too obvious: in the picture, except for the line of 'No record yet' and the label 'Card number', the other places are light gray. The white background is because the corresponding label displays the declared background color)

In summary, when writing styles in the future, you must explicitly declare the background of the element, including setting the background image and specifying a similar background color as a fallback. It is also best to specify the foreground color. Of course, you don't have to set it once for each element. Elements of the same style in the same module only need to be declared once on the module container.

<<:  Uniapp uses Baidu Voice to realize the function of converting recording to text

>>:  Example of how to set div background transparent

Recommend

Detailed installation and use of docker-compose

Docker Compose is a Docker tool for defining and ...

Implementation of MySQL GRANT user authorization

Authorization is to grant certain permissions to ...

How to change the mysql password on the Xampp server (with pictures)

Today, I found out while working on PHP that if w...

Implementing access control and connection restriction based on Nginx

Preface Nginx 's built-in module supports lim...

Improvements to the web server to improve website performance

<br />In the first section of this series, w...

JavaScript recursion detailed

Table of contents 1. What is recursion? 2. Solve ...

Nginx domain name SSL certificate configuration (website http upgraded to https)

Preface HTTP and HTTPS In our daily life, common ...

Example operation MySQL short link

How to set up a MySQL short link 1. Check the mys...

Detailed explanation of four types of MySQL connections and multi-table queries

Table of contents MySQL inner join, left join, ri...

CSS example code for implementing sliding doors

The so-called sliding door technology means that ...

A complete guide to some uncommon but useful CSS attribute operations

1. Custom text selection ::selection { background...

Detailed steps to install MySQL 5.7 via YUM on CentOS7

1. Go to the location where you want to store the...