In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to set up div background pictures in html". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to set up div background pictures by html.
Html sets the method of div background picture: 1, use the style attribute of div element, the syntax is ""; 2, add "{background-image:url (picture name);}" style to div element.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
The method of setting div background Picture by html
1. The syntax for html to add background images to div is as follows:
Put pictures and web pages in a folder, pay attention to the picture suffix, here is .jpg is only suitable for JPG images, other types of pictures change their suffixes.
The code is as follows:
Demo
Output result:
2. You can set the background image by adding the style "{background-image:url (picture name);}" to the div element, as follows:
Demo.ellipse {width: 400pxposition height: 200pxscape backgroundhorse image: url (1115.08.png);}
Output result:
At this point, I believe you have a deeper understanding of "how to set up div background pictures in html". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.