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 set the background center untiled by css

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

In this article, the editor introduces in detail "css how to set the background is not tiled", the content is detailed, the steps are clear, the details are handled properly, I hope this "css how to set the background is not tiled" article can help you solve your doubts, the following follows the editor's ideas slowly in depth, together to learn new knowledge.

In css, you can use the background attribute to set the background untiled, which is used to set the background style of the element. "no-repeat" indicates that the background is not tiled, center indicates that the background is centered, and the syntax is "background:url (path) no-repeat center".

The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.

How to set the background center and untiling for css

You can use the background property.

The background abbreviation property can set all the background properties in a declaration.

The values are separated by spaces, regardless of order. You can have only some of these values, such as background:#FF0000 URL (smiley.gif); are allowed.

The properties that can be set are:

Background-color specifies the background color to use

Background-position specifies the location of the background image

Background-size specifies the size of the background picture

Background-repeat specifies how to repeat the background image

Background-origin specifies the location area of the background image

Background-clip specifies the painting area of the background image

Background-attachment sets whether the background image is fixed or scrolled along with the rest of the page.

Background-image specifies one or more background images to use

Examples are as follows:

Body {background: url (/ i/eg_bg_03.gif) no-repeat center;}

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Here are some texts.

Output result:

After reading this, the article "how to set the background of css is not tiled" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, 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