Background attachment part 2

The background-attachment Values



You can also set the background-attachment to inherit or scroll.
When you set the background-attachment to inherit, it will inherit the value from its parent element. 

When you set the background-attachment to scroll, the background image will scroll with the rest of the content.

The CSS:
body {
background-image: url("css_logo.png");
background-repeat: no-repeat;
background-attachment: scroll;
}
Try It Yourself

Result:
Tap Try It Yourself to play around with the code!

Comments

Popular posts from this blog

font-family part 1

Styling the list part 3