console
<div class="lazy">
<div class="space">
<img src="http://pms.anxx.com.cn/static/img/0911-01.844b69e.jpg" />
</div>
</div>
<style>
*{
margin:0;
padding:0;
}
.lazy{
position:fixed;
top:0;
right:0;
bottom:0;
left:0;
background:rgba(0,0,0,.6);
}
.lazy .space{
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
text-align:center;
font-size:0;
}
.lazy .space:after,
.lazy img{
display:inline-block;
vertical-align:middle;
}
.lazy .space:after{
content:'';
height:100%;
}
.lazy img{
max-width:100%;
max-height:100%;
}
</style>
*{
margin:0;
padding:0;
}
.lazy{
position:fixed;
top:0;
right:0;
bottom:0;
left:0;
background:rgba(0,0,0,.6);
}
.lazy .space{
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
text-align:center;
font-size:0;
}
.lazy .space:after,
.lazy img{
display:inline-block;
vertical-align:middle;
}
.lazy .space:after{
content:'';
height:100%;
}
.lazy img{
max-width:100%;
max-height:100%;
}