Background-Attachment

The background-attachment property controls whether a background image scrolls with the content of a web page or not. The background- attachment property has the value of ‘scroll’ as the default value for the web page and can take following values

Value

Description

Scroll

The background image scrolls with the rest of the page.

Fixed

The background image is fixed

It is used as
body
{ background-image: url(logo.jpg); background-attachment: fixed; }

Get industry recognized certification – Contact us

Menu