Get the App
SLTechnology News&Howtos  ›  Development  › 

How to set up background background Picture by css

Shulou Source: shulou.com Published: 2022-06-01 06:53:31 10月04日 Update

This article mainly shows you "css how to set background background picture", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "css how to set up background background picture" this article.

1. No equipment installation, tiling mode, objects covered with background pictures.

1). Example CSS code:

.logo {width:405px;height:200px; bac kilogram round: url (/ / www.css5.com.cn/imgthink2015/logo.gif)}

Description: directly set the equipment background backing style to introduce pictures, do not set the repeated repeat attribute value.

2), html instance code

3) screenshot of the effectiveness of the back round set picture

No backup tiling door path picture is configured as a background tiling object

2. Pictures of non-frequent backers

1), example CSS code

.logo {width:405px;height:200px; bac kilogram round: # F00 url (/ / www.css5.com.cn/imgthink2015/logo.gif) no-repeat 20px 30px}

Here at the same time configure the background color and backing picture, and configure the no-repeat 20px 30px image to reveal the performance, interval left 20px, interval 30px.

2). Example html code:

3) screenshot of the effectiveness of css bac kilogram round

Div css instance simultaneously sets backing color and backing image unyielding screenshot of instance

2. Configure background image tiling (from left to right)

1). CSS code of tiling instance with the degree of background image.

.logo {width:405px;height:200px; bac kilogram round: # F00 url (/ / www.css5.com.cn/imgthink2015/logo.gif) repeat-x 0 40px}

Note: set the repeat-x image as the backing water clear light shop, 0 40px, set the picture to the top interval 40px beginning degree tile

2), HTML code:

3). Screenshot of an example

Screenshots of tiling examples backed by pictures

3. Set up the equipment, set up the picture and tile the scene vertically (from top to bottom).

1), div css sets the background background image vertical tile instance CSS code

.logo {width:405px;height:200px; bac kilogram round: # F00 url (/ / www.css5.com.cn/imgthink2015/logo.gif) repeat-y 60px 0}

Note: repeat-y setup equipment backup picture tiled from top to bottom, picture distance left 60px

2), example html code

CSS5

3). Screenshot of bac kilogram round instance

Css picture as a screenshot of vertical tiling from top to bottom of the backer.

The above is all the contents of the article "how to set up background background pictures in 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!

Tags: Picture example code screenshot background backstop background picture backing arrangement configuration content degree article background background backup object effectiveness learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MySQL MariaDB Redmi NVidia