Genies Hour (4)
CSS-background
Know
The CSS background properties are used to define the background effects for elements. CSS background properties:
background-color
background-image
background-repeat
background-attachment
background-position
What I have learned?
~The
background-color property specifies the background color of an element.- a valid color name - like "red"
- a HEX value - like "#ff0000"
- an RGB value - like "rgb(255,0,0)
~The
background-image property specifies an image to use as the background of an element.
~The
background-image property repeats an image both horizontally and vertically.
~If the image above is repeated only horizontally (
background-repeat: repeat-x;) To repeat an image vertically, set background-repeat: repeat-y;~The position of the image is specified by the
background-position property
~To specify that the background image should be fixed (will not scroll with the rest of the page), use the
background-attachment property
What problem do I foresee happening?
Missing an end tag or (;)
Mixing up the image tag and background-image tag
How can I solve than now?
Try both and see the differences
Comments
Post a Comment