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

How to set background Picture in html

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

In this article, the editor introduces "how to set the background picture in html" in detail, the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to set the background picture in html" can help you solve your doubts.

The way to set the background image in html is to add the background-image attribute to the body and set the url of the background image, for example, [background-image:url (');].

This article operating environment: windows10 system, html 5, thinkpad T480 computer.

The background-image property sets the background image of an element.

The background of the element is the total size of the element, including fills and boundaries (but excluding margins).

By default, the background-image is placed in the upper-left corner of the element and repeats the vertical and horizontal directions.

Common attribute values:

URL of url ('URL') image

None has no image background to display. This is the default property value

Inherit specifies that the background image should inherit from the parent element

Code example:

(php.cn) body {background-image:url ('https://cache.yisu.com/upload/ask_collection/20210725/111/116372.gif'); background-color:#cccccc;} Hello World! After reading this, the article "how to set background pictures in html" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, please follow the industry information channel.

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

Internet Technology

Wechat

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

12
Report