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 css tiles the background image on the page

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

Share

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

This article mainly shows you the "css how to tile the background image on the page", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "css how to tile the background image on the page" this article.

If you want to tile the image of the backer on the page, you can use the background-repeat attribute.

The attribute value repeat causes the image to be tiled vertically in the horizontal direction, just like the usual practice of setting images in the past. The division of repeat-x and repeat-y causes the image to be tiled only several times for horizontal or vertical purposes, while no-repeat does not allow the image to be tiled for the purpose of resignation.

By default, the background image will start from the upper left corner of an element. Take a look at the example above:

Body {bac kg round-image: url (/ i/eg_bg_03.gif); bac kg round-repeat: repeat-y;}

If you need to search for the efficacy of the above example, or give it a try.

Backing positioning

Perhaps manipulate the background-position attribute to reverse the image's position in backup.

The above example centers a background image in the body element:

Body {background-image:url ('/ iThromBGO); bac kilogram round-repeat:no-repeat; background-position:center;}

There are many doorways to supply values for the bac kilogram round-position property. First of all, some pivot words can be used: top, bottom, left, right and center. In general, these key words will be presented in pairs, but not always how. It is also possible to apply a length value, such as 100px or 5cm, or a percentage value at the end. The values of the same type are slightly different from the arrangement of the backing image.

Key word

The image placement hub word is the easiest to understand, and its persuasion is explained as it is commonly known. For example, top right places the image in the upper-right corner of the inner margin area of the element.

According to the scale, seat hub words can emerge in any way, as long as the guarantee is no more than two hub words-one corresponding to the level of left favouritism, the other corresponding to vertical left favouritism.

If only one crux word appears, the other key word is considered to be center.

The above is all the content of the article "how to tile the background image on the page by css". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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