Get the App
SLTechnology News&Howtos  ›  Development  › 

How to express the percentage value of HTML

Shulou Source: shulou.com Published: 2022-06-01 04:52:48 10月03日 Update

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!

Tags: Numerical value percentage element image image upper left corner content more core knowledge photographic appropriate practical cumbersome successful learning and then central point at the same time dilemma status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft NVidia OPPO Reno Shulou Information