Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the use of the css background function cross-fade ()

Shulou Source: shulou.com Published: 2022-06-01 02:36:49 09月21日 Update

Editor to share with you what is the use of the css background function cross-fade (), I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Cross-fade ()

Cross-fade is used to apply transparency to two superimposed background images. The usage is as follows

Background-image:-webkit-cross-fade (url ('. / bg1x.png'), url ('. / bg2x.png'), 70%)

The first two parameters are the resource location of the picture, and the latter one needs to pass in a percentage to indicate transparency, which is relative to the last picture. For example, when the percentage is 0%, only the first picture should be displayed.

When the percentage is 100%, only the second picture is displayed.

This property is completely incompatible in firefox, but much better in chrome and safari.

The above is all the content of the article "what is the use of the css background function cross-fade ()". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Picture background percentage percentage article transparency function content not much two location compatibility parameters most attributes more knowledge background pictures industry better Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MySQL Shulou Tech Info Linux Redmi