JSFiddle - React, Tailwind, and code Playground

by web tiki

HTML

<div>
    <img src="http://lorempixel.com/output/people-q-g-50-50-1.jpg" alt="" />
</div>

CSS

body,html{
    height:100%;
    margin:0;
}
div{
    position:relative;
    width:70%;
    height:70%;
    background:gold;
}

img{
    position:absolute;
    top:0; bottom:0;
    left:0; right:0;
    margin:auto;
}