JSFiddle - React, Tailwind, and code Playground
by Max Lensky
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" 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-x: hidden;
}
.parent {
width: 100%;
height: 100%;
position:relative;
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:;
text-align:center;
position:;
}