In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "introduction to the operation of CSS background". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "introduction to the operation of CSS background".
# background color
Background-color
Background-color: red;background-color: rgb (88pr 88je 88)
# background image
Background-image: url ("show.jpeg")
# background tiling
The picture is not tiled
Background-repeat: no-repeat
# whether the background scrolls
Optional value scroll fixed
Background-attachment: fixed
Background color
Background-color: red
The color can be set to hexadecimal or rgb or rgba
1.5.2. Background picture
Background-image: url (image path)
1.5.3. Background tiling
Background-repeat: background tiling; 1.repeat tiling default 2.no-repeat untiling 3.repeat-x horizontal tiling 4.repeat-y vertical tiling 1.5.4. Whether the background scrolls
Background-attachment: whether the background scrolls
1.scroll default picture scrolls with the box 2.fixed pictures do not scroll with the box
1.5.5. Background position
1. Regardless of the order in which the locative noun right top left center bottom is written
two。 If the pixel is a pixel, then by default, a coordinate system is built with the upper-left corner of the "current box" as 0 0 origin. The first value is the position of the X axis, and the second value is the position of the Y axis. The interactive point is the starting position of the picture.
Say one more word:
1. The X axis of the coordinate system in the program is horizontal to the right and the Y axis is vertically downward.
2. Pay attention to the order
3. Percentage refers to the width and height of its own box: the final position is the percentage of the width and height of the current box itself-the percentage of the width and height of the picture itself
4. You can also mix and rewrite. You need to consider the order.
# abbreviation of background
Background: background color background picture address background tiling background scrolling background position
# the difference between img and background image:
Img does not need to write width and height to display on the page.
By default, the background image can not hold up the container, so you need to write width and height.
General product insert images are recommended to use img, while some small icon or rarely updated pictures or oversized pictures are recommended to use background images
And the background image can be covered with internal text, but not img (unless positioning is used later)
Thank you for your reading, the above is the content of "introduction to the operation of CSS background". After the study of this article, I believe you have a deeper understanding of the introduction of the relevant operation of CSS background, and the specific use needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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: 208
*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.