Here is how to create a traffic simulation using HTML/CSS ...and a pinch of JavaScript. I used CSS3 animations, vehicle images from freepik and jQuery.
Details about the simulator is explained on the blog: https://ashiqur.com/traffic-simulation-with-html-css/