JSFiddle - React, Tailwind, and code Playground
by luka kupunia
HTML
<div class="box">
<img...
CSS
.box {
width: 400px;
height: 600px;
padding-top: 20%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.box img {
width: 100%;
height: 100%;
object-fit: contain;
position: absolute;
top: 0;
left: 0;
}
JavaScript
var a = document.querySelector('#skip');
a.addEventListener('keydown',function(e){
if(e.keyCode && e.keyCode == 13){
document.querySelector('#more').focus();
}
})
a.addEventListener('click',function(e){
document.querySelector('#more').focus();
})