-
Book Overview & Buying
-
Table Of Contents
Web Developer's Reference Guide
By :
The CSS background properties handle the display of background effects on HTML elements.
The
background-attachment CSS property defines how the background of an element scrolls relative to its containing parent, and it looks like this:
background-attachment: fixed;
There are three values: scroll, fixed, and local.
scroll: The background does not move within its container
fixed: The background stays fixed to the viewport, no matter what
local: The background scrolls within its container and the viewport
CSS:
.scroll {
background-attachment: scroll;
}
.fixed {
background-attachment: fixed;
}
.local {
background-attachment: local;
}Here is a demo in CodePen: http://tiny.cc/css-background
The
background-blend-mode CSS property specifies how the background image of an element should blend with its background color, and it looks like this:
background-blend-mode: multiply;
There are 18 possible blend mode values:
color...
Change the font size
Change margin width
Change background colour