Get the App
SLTechnology News&Howtos  ›  Development  › 

How to set the background color to solve the problem of png picture setting background does not display

Shulou Source: shulou.com Published: 2022-06-03 08:39:40 11月15日 Update

This article introduces the relevant knowledge of "how to set the background color to solve the problem that png pictures are not displayed in background". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Because it is a png image, when it is set to background, sometimes when the background color of any parent class of the div/p/ is not much different, the png image seems to have not been loaded. At this time, we can set any background color to this div/p/ to distinguish it from the parent class.

The code is as follows:

Set a background image png format, the picture is black and white, but because the background color of body is set to black, the white of that background picture will be masked. At this time, we can set a background color to the div, such as # 666.Then the white part of the background color can be displayed.

This is the end of the content of "how to set background color to solve the problem of png picture setting background does not display". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Background picture time white question content more knowledge background picture practical learned next not big code dilemma reality situation article sometimes format Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MariaDB NVidia Redmi Apple