Get the App
SLTechnology News&Howtos  ›  Development  › 

How to put an image into the background by CSS

Shulou Source: shulou.com Published: 2022-06-01 10:29:48 11月15日 Update

This article mainly shows you "CSS how to put the image into the background", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "CSS how to put the image into the background" this article.

To put the image behind, you need to use the background-image attribute. The default value of the bac kilogram round-image attribute is none, which indicates that no images are placed on the background.

If you need to set up a backup image for the equipment, you must configure a URL value for this property:

Body {background-image: url (/ i/eg_bg_04.gif);}

Most of the backing is applied to the body element, but it's not limited to that.

The following example uses a backer for a paragraph without setting the rest of the document:

P.flower {background-image: url (/ i/eg_bg_03.gif);}

You may even set up a background image for an in-line element. The following example configures a background image for a link:

A.radio {background-image: url (/ i/eg_bg_07.gif);} above is all the content of the article "how to put an image into the background of CSS". 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: Images background content images attributes articles examples elements backing scenery furnishings learning help configuration necessary backup documentation easy to understand more organized Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Technology Xiaomi OPPO Reno NVidia