Scroll full image inside div

后端 未结 4 1371
难免孤独
难免孤独 2021-01-29 04:11

I have this image appended to a div JSFiddle and my Div is inside a modal. I\'v tried to display by default the bottom left quarter (like filling the div) and to allow the user

4条回答
  •  独厮守ぢ
    2021-01-29 04:54

    The solution is quite simple:

    1. Don't use display: inline-block; as it will place the image will be placed inline and with some margin down. Instead use display: block

    2. The top: -50%; is also moving the picture 50% up leaving it's original position blank

提交回复
热议问题