JSFiddle - React, Tailwind, and code Playground
by LordGuard
HTML
<script src="https://vuejs.org/js/vue.min.js"></script>
<div id="app">
<div id="list">
<div class="item" v-for="item in 100000">
Something {{ item }}
</div>
</div>
<div id="wrap">
<div id="box"></div>
</div>
</div>
CSS
#app {
display: flex;
flex-wrap: wrap;
width: 100vw;
height: 100vh;
}
#list {
position: absolute;
display: flex;
flex-wrap: wrap;
width: 100%;
height: 100%;
}
.item {
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 50px;
margin: 5px;
background: white;
text-align: center;
}
#wrap {
position: absolute;
contain: strict;
width: 100vw;
height: 100vh;
z-index: 100;
top: 0;
left: 0;
backface-visibility: hidden;
}
#box {
position: absolute;
width: 40px;
height: 40px;
background: black;
animation: box-animation 2s infinite;
}
@keyframes box-animation {
0% {
left: 0
}
50% {
left: 200px
}
100% {
left: 0
}
}
JavaScript
var demo = new Vue({
el: '#app'
})