<div class="allSeeBigImg"><img src="" alt=""></div>
var isSeeBigImg = true, clientWidth = $(window).width(), clientHenght = $(window).height(), CHCWrotia = clientHenght / clientWidth
$('.new_anser_imgs').on('click','img',function(){
var src = $(this).prop('src')
$('.allSeeBigImg img').prop('src',src)
var imgWidth = $(this).width()
var imgHeight = $(this).height()
var IHIWrotia = imgHeight / imgWidth
if(IHIWrotia < CHCWrotia){
$('.allSeeBigImg img').css({
'width':'100%',
'height':'auto'
})
}else{
$('.allSeeBigImg img').css({
'width':'auto',
'height':'100%'
})
}
$('.allSeeBigImg').stop().fadeIn(200)
})
$('.allSeeBigImg').click(function () {
$(this).stop().fadeOut(200)
})
.allSeeBigImg{
width:100%;
height:100%;
position:fixed;
top:0;
left:0;
background:#000;
z-index:10000;
display:none;
overflow: hidden;
}
.allSeeBigImg::-webkit-scrollbar{
display: none;
}
.allSeeBigImg img{
position:absolute;
top:50%;
left:50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}