JSFiddle - React, Tailwind, and code Playground

by Igor Schnaider

HTML

<div class="parent">
    <img class="block" src="http://free-pc.ru/images/podp_str/header.png" alt="" />
   </div>

 <div class="parent">
    <img class="block m" src="http://free-pc.ru/images/podp_str/body.png" alt="" />
   </div>

CSS

html, body {
    background: url(http://free-pc.ru/images/podp_str/fon_1920_1178.jpg) no-repeat; /* фон */
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.parent {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    text-align: center;
    font-size: 0;
    
    &:before {
        height: 100%;
        display: inline-block;
        vertical-align: middle;
        content: '';
    }
}

.block {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    display: inline-block;
    white-space: normal;
    vertical-align: middle;
    text-align: left;
    
} 

.m {
    padding: 100px 7.142857% 0 !important;
}