Skip to content

Commit

Permalink
Merge pull request #8935 from Shrijhaa/Frontend_Web_Development_HTML_…
Browse files Browse the repository at this point in the history
…CSS_JS

CSS background-attachment
  • Loading branch information
code-reaper08 authored Nov 30, 2021
2 parents 5bc752a + 2a20a87 commit 59b4bec
Showing 1 changed file with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
> **Background\_attachment**
> --------------------------
The background\_attachment property in CSS specifies
how to move the background relative to the viewport.

**background\_attachment** : _scroll | fixed | local | initial | inherit_

**scroll**

The background image will scroll with the page. This is default

![Screenshot (193)](https://user-images.githubusercontent.com/78959087/144102860-505d940b-df09-487d-844f-610163a07d11.png)

**fixed**

The background image will not scroll with the page

![Screenshot (194)](https://user-images.githubusercontent.com/78959087/144102906-1b9e06d0-8cb7-46cc-aca4-959b6958644c.png)

**local**

The background image will scroll with the element’s contents

![Screenshot (195)](https://user-images.githubusercontent.com/78959087/144102629-d79e1673-fafe-43e5-b3ac-360bb7e216f0.png)


**initial**

Sets this property to its default value

**inherit**

Inherits this property from its parent element


[https://codepen.io/shrijhaa/full/xxXKMdx](https://codepen.io/shrijhaa/full/xxXKMdx)







0 comments on commit 59b4bec

Please sign in to comment.