In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "html how to achieve elastic width center", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "html how to achieve elastic width center" bar!
Indication of elastic width:
1. Because the overall size of the elastic structure depends on the user's default font size, the elastic structure is more difficult to anticipate. Assuming it is used correctly, the flexible mechanism is more convenient for users who need larger fonts, because the length of the line still insists on the right proportion.
two。 The size of the div in this structure depends on the 100% font size in the body element. If you reduce the overall size of the text by applying "font-size: 80%" to the body element or # container, keep in mind that the group agency will zoom in proportionally. You'd better increase the width of each div to compensate for this.
3. Assuming that the font size is changed by a different amount in each div (for example, the font size on # sidebar1 is 70% font size on # div is 85%), rather than changing the overall size of the master plan, the overall size of each div will be changed proportionally. You'd better mediate according to the ultimate font size.
Html template framework code (the code can be copied directly to the application):
Elastic width center, header pattern footer structure template online demo CSS5body {font: 100% Arial; bac kg round: # 666666 political margin: 0 position padding: 0 auto;border: center;color: # 000000} # container {width:46em;bac kg round: # FFFFFF;margin: 0 auto;border: 1px solid # 000000X textMutual align: left} # header {bac kg round: # DDDDDD; padding: 0 10px 020px;} # header H2 {margin: 0twitterpadding: 10px 0 } # mainContent {padding: 020pxbot background: # FFFFFF;} # footer {padding: 010pxpolitic background DDDD;} # footer p {margin: 0Tracterpadding: 10px 0;}
1. Because the overall size of the elastic organization depends on the user's default font size, the elastic structure is more difficult to predict. If it is applied precisely, the flexible mechanism is more convenient for those users who need larger fonts, because the length of the line still insists on the right proportion.
two。 The size of the div in this structure depends on the 100% font size in the body element. Assuming that you reduce the overall size of the text by using "font-size: 80%" on the body element or # container, keep in mind that the overall size will be scaled up. You'd better increase the width of each div to make up for this.
3. Assuming that the font size is changed according to the amount of gap in each div (for example, the font size on # sidebar1 is 70% font size on # div is 85%), rather than changing for the overall management development, the overall size of each div will be changed proportionally.
Thank you for your reading, the above is the content of "how to achieve elastic width center in html". After the study of this article, I believe you have a deeper understanding of how to achieve elastic width center in html, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.