Answers for "css backgroundimaage cover"

CSS
3

html background image fit to screen

body {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
Posted by: Guest on May-11-2020
1

how to scale a bg image acc to size of div

/* One way */
background-size: cover;

/* Other option */
background-size: contain;
Posted by: Guest on July-31-2020

Browse Popular Code Answers by Language