JSFiddle - React, Tailwind, and code Playground
by halirgb
HTML
<div class="container">
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" /><img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
<img src="http://lorempixel.com/400/200/" alt="" />
</div>
CSS
html, body {
margin: 0;
padding: 0;
}
.container{
width: auto;
height:210px;
overflow-x: scroll;
overflow-y: hidden;
white-space: nowrap;
}
JavaScript
var windowHeight = $(window).height();
$('.container').css('height', windowHeight)