Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Can multiple background pictures be added to html?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Whether html can add multiple background pictures, in view of this question, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

Html can add multiple background images. In html, you can set multiple background images for a container through background-image or background, that is, put different background images into only one block element; syntax "background:url (picture address), url (address)."

The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

In html, you can set multiple background images for a container through background-image or background, that is, you can put different background images into only one block element.

First of all, let's look at the grammar:

Background: [background-image] | [background-origin] | [background-clip] | [background-repeat] | [background-size] | [background-attachment] | [background-position]

The url of multiple background images can be separated by commas. If there are multiple background images and there is only one other attribute (for example, there is only one background-repeat), then all background images apply this property value.

Let's look at an example:

Body {background-image: url (https://image.flaticon.com/icons/svg/748/748122.svg), url (https://images.unsplash.com/photo-1478719059408-592965723cbc?ixlib=rb-1.2.1&auto=format&fit=crop&w=2212&q=80); background-position: center, top; background-repeat: repeat, no-repeat; background-size: contain, cover) } the answer to the question about whether html can add multiple background pictures is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report