JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper">
<div class="item">
<img src="https://dl.dropboxusercontent.com/u/41726334/test-img2.jpg" alt="" />
</div>
</div>
CSS
*{
padding: 0;
margin: 0;
vertical-align: top;
}
html,
body{
width: 100%;
height: 100%;
}
.wrapper{
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.item{
position: absolute;
top: 50%;
left: 50%;
display: inline-block;
}
.item img{
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}