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 use the background-attachment property of CSS

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Most people do not understand the knowledge points of this article "how to use the background-attachment attribute of CSS", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to use the background-attachment attribute of CSS" article.

Example

How to specify a fixed background image:

Body

{

Background-image:url ('smiley.gif')

Background-repeat:no-repeat

Background-attachment:fixed

}

Label definition and instructions for use

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

Default: scroll inheritance: no version: CSS1JavaScript syntax: objectobject.style.backgroundAttachment= "fixed"

Browser support

The number in the table represents the first browser version number that supports the property.

The number immediately before-webkit-,-ms- or-moz- is the first browser version number that supports the prefix attribute.

Property background-attachment1.04.01.01.03.5

Note: Internet Explorer 8 and earlier browsers do not support multiple background images in one element.

Attribute value

The value indicates that the scroll background picture scrolls along with the rest of the page. This is the default fixed background image is fixed inherit specified background-attachment settings should be inherited from the parent element above is about "how to use the background-attachment property of CSS" the content of this article, I believe we all have a certain understanding, I hope the content shared by the editor will be helpful to you, if you want to know more about the relevant knowledge content, please 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