monks/background_attachment

The background-attachment CSS property sets whether a background image’s position is fixed within the {{glossary(“viewport”)}}, or scrolls with its containing block.

Values

pub const fixed: #(String, String)
  • : The background is fixed relative to the viewport. Even if an element has a scrolling mechanism, the background doesn’t move with the element.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const local: #(String, String)
  • : The background is fixed relative to the element’s contents. If the element has a scrolling mechanism, the background scrolls with the element’s contents, and the background painting area and background positioning area are relative to the scrollable area of the element rather than to the border framing them.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for background-attachment

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const scroll: #(String, String)
  • : The background is fixed relative to the element itself and does not scroll with its contents. (It is effectively attached to the element’s border.)
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for background-attachment. It will be wrapped in var() and have -- prepended.

Search Document