3. background-image #

Created Monday 15 June 2020

Syntax #

body {
  background-image: url("paper.gif"); /* url('path-to-image') */
}

Variations #

  1. Prevent repeating - background-image repeats an image both horizontally and vertically, to control this use:
    body {
    	background-image: url("something");
    	background-repeat: repeat-x; /* or repeat-y or no-repeat */*
    }
    
  2. Specify the position:
    body {
      background-image: url(something);
      background-attachment: fixed; /*scroll, background does not change*/
    }
    
  3. Fill value - background-size: cover | fill etc.