In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the background of css and the relevant knowledge points about how to set background. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Grammar and structure
1. Grammar:
Background: bac kg round-color | | bac kg round-image | | bac kg round-repeat | | background-attachment | | background-position
2. The parameters of bac kilogram round are indicated:
The bac kilogram round attribute is a composite attribute. It is popular to say that the post-round value of bac kg can be set to multiple values, such as setting colors, repeated tiling of set pictures, and other specific backing details.
Second, bac kilogram round attribute split
1. The hue of the diameter self-setting
Background-color:#000
Configure the backup hue to black.
But the abbreviation of the introduction:
Background:#000
Get rid of-color in background-color, and the result is no less than a waste of code.
2. Background picture
Background-image:url (where the scenery picture is located); bac kg round-repeat:no-repeat;bac kg round-position:10px 20px
Set up the equipment backer picture (introduce the picture as the backer), the picture does not background-repeat:no-repeat; again and again (background-repeat:no-repeat;), after the picture as the backing, the picture is the primary representation of the 10px on the right side of the object, and the picture is away from the above 20px to reveal the performance (bac kg round-position:10px 20px).
Introduction abbreviation:
Bac kg round:url (backer picture) no-repeat 10px 20px
Scene CSS values can be separated by spaces, throwing away the code and communicating results at the same time, compare the odd attribute setting equipment and the acronym bac kilogram round to see if you can waste CSS code.
III. Bac kg round profile
The background color of the above CSS setting is # CCC, and the image logo.gif is introduced (the path must be accurate or you have no choice but to introduce the backing image). The object in the background image does not flash again and again, and the image begins to be separated by the left 10px and the upper interval 20px.
4. Configure background color
Backup hue or novice will want to use bac kg round-color to configure, but it is recommended that the abbreviation of the austerity code can be directly used with the backkilogram round attribute.
The following example sets the CSS width and CSS height pattern in order to peek into the various names of the scenery fancy in DIV.
1. Backup color setting example CSS code
.logo {width:405px;height:200px;background:#F00}
Bac kilogram round: # F00 sets the background hue of the equipment to red
2. Html code:
3. Screenshot of instance effectiveness
5. Set up equipment and equipment, bac kg round backer picture
1. No tiling method is set for objects covered with backup pictures.
1). Example CSS code:
.logo {width:405px;height:200px; background:url (/ / www.css5.com.cn/imgthink2015/logo.gif)}
Description: directly set the equipment background background hall to introduce pictures, do not configure duplicate repeat attribute values.
2), html instance code
3) screenshot of background backing image
2. Pictures of not backing again and again
1), example CSS code
.logo {width:405px;height:200px; background:#F00 url (/ / www.css5.com.cn/imgthink2015/logo.gif) no-repeat 20px 30px}
Here at the same time configure the background tone and backing picture, and configure the no-repeat 20px 30px image as the setting is not tiled frequently to reveal the performance, interval left 20px, interval 30px
2). Example html code:
3) screenshot of the effectiveness of css bac kilogram round
2. Configure backup image tiling (from left to right)
1). CSS code of background image tiling instance
.logo {width:405px;height:200px; background:#F00 url (/ / www.css5.com.cn/imgthink2015/logo.gif) repeat-x 0 40px}
Elucidation: configure the repeat-x picture as the set water and oil shop, 0 40px, set the picture up to the distance, 40px split the degree of tiling
2), HTML code:
3). Screenshot of an example
3. Set the image backup vertical tile (from top to bottom)
1), div css sets bac kg round background picture 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}
Clarification: the image is tiled from top to bottom behind the repeat-y setting, the distance from the picture to the left 60px
2), example html code
CSS5
3) screenshot of bac kg round instance
These are all the contents of the article "how to set up the background background of css". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.