Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

how to use background property in css

body {
  height: 100vh;
  background: url(relative path or url in double quotes) | linear-gradient()
  background-size: cover | contain | any unit value e.g. 1500px;
  background-attachment: fixed | local | scroll;
  background-position: x-offset(values:left,center,right) y-offset(values:top,center,bottom);
                       /* or single value for both x & y-offset */
  background-repeat: repeat (enabled by default) | no-repeat;
  /* some of them will only work provided height of the container */
  /* That's pretty much it folks */
  /* I can't cover details of each value. You'd have to search it */
}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #background #property #css
ADD COMMENT
Topic
Name
9+4 =