0

I have a tag such below :

<div data-thumb="http://aeo-azsharghi.ir/images/photo_2017-07-26_08-35-
    11_th.jpg" style="background-size: cover;" data-src="http://aeo-
    azsharghi.ir/images/photo_2017-07-26_08-35-11.jpg" data-alignment="topCenter">
</div>

My need is fitting image as a background image to div.

ɢʀᴜɴᴛ
  • 32,025
  • 15
  • 116
  • 110

1 Answers1

0

I tried this post solution and it worked for me. Fit background image to div

background-size: contain;
background-size: cover;
background-size: 100%;

.container{
    background-size: 100%;
}