Skip to content Skip to sidebar Skip to footer

Background-image Property Is Not Showing The Image In Css

I was trying to put background image but it is not showing. .jumbotron{ background-image: url('/src/assets/shop1.png'); background-size: cover; }

Solution 1:

The background image will look at the height and width of the div. Please follow the code to see the image.

.jumbotron {
   background-image: url('https://imgsv.imaging.nikon.com/lineup/dslr/df/img/sample/img_01.jpg');
  background-size: 100% 100%;
  height: 100px;
  width: 100%;
  background-repeat: no-repeat;
}

Working demo


Post a Comment for "Background-image Property Is Not Showing The Image In Css"