In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how CSS makes the level of the web page in the picture center. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Use CSS to center the level of the page in the picture:
Text-align:center
Introduction to pattern centered text-align:center:
Text-align:center is the central utility in the form of degree, and the picture on the hook page is introduced using the img tag, so to make the picture in the middle, it is only necessary to set this level to the picture parent (one level above) to center the CSS.
1. Set the image level in div to center an example.
1. CSS code
Div {width:400px; height:110px;text-align:center}
This sets the image in the div to be centered.
2. Html code
3. Screenshot of an example where the image level is in the middle.
Screenshot of an example where the img image is centered within the div
Second, set the center for the picture in the specified class object
1. CSS code
.exp {width:300px; height:80px;text-align:center}
To see the center of the picture, configure the width and height of the object
2. HTML form code
3. Screenshot of efficacy
The picture is in the middle as content.
Thank you for reading! This is the end of the article on "how to center the web page in the picture". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.