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 express the percentage value of HTML

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

Share

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

This article introduces the relevant knowledge of "how to express HTML percentage". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The percentage value indicates that the door diameter is becoming more and more complicated. If you want to center the image in its element with a percentage value, this is easy:

Body {background-image:url ('/ iThromBG / position:50% 03.gif'); background-repeat:no-repeat; bac kilogram round-50%;}

This results in the proper layout of the image, and the core is aligned with the core of its element. In other words, percentage values are used for both elements and images. In other words, the 50% point (perimeter point) described in the image is aligned with the 50% point (center point) depicted in the element.

If the image is at 0%, the upper-left corner is placed in the upper-left corner of the inner margin area of the element. If the image status is 100% 100%, the lower right corner of the image will be placed in the lower right corner of the left margin.

So, if you want to put an image on the horizontal left side 2max 3 and the vertical target 1max 3, what is the statement?

Body {bac kilogram round-image:url ('/ iBUBUBG BGUBG 03.gif'); background-repeat:no-repeat; background-position:66% 33%;}

If only one percentage value is supplied, the value provided will be used as the degree value, and the vertical value will be 50%. This is contrary to the crux of the problem.

The default value of bac kilogram round-position is 0%, which is equivalent to top left in compliance. This explains why the matching image is always tiled from the upper left corner of the inner margin area of the element, unless you are configured with a different identity value.

This is the end of the content of "how to express HTML percentage". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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