Virtualisation in carousel

I want to to make virtualised carousel. That is if there are 20 items in the carosel then only 3 div should be present in the dom. Also there should be swipe functionality, so for that I thought of using transition and transform.

How can I achieve the idea of virtualisation without adding new node to the dom.

Also don't want to use any library

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum