HTML embed breaking on the site

Hi, I’m trying to embed a image gallery in which the images automatically flip to the next one randomly.

But when I embed it in the HTML container it doesn’t stay in the constraints of the block.

Could you tell me what’s the issue with the code OR let me know how I can achieve this image flip animation in webflow? Additionally can we do this using images uploaded in CMS?

Thanks in advance.


Here is my site Read-Only: https://preview.webflow.com/preview/poocho-sep-2020?utm_medium=preview_link&utm_source=designer&utm_content=poocho-sep-2020&preview=ec13a410f962f40401f7d27818a28ad5&pageId=6056fde11a8737422306c643&mode=preview
(how to share your site Read-Only link)

Try with. cleaner code. I removed the head especially.

https://pastebin.com/3R7EWP89

Thanks Vincent. There is a some offset in the component. Also, the flip animation doesn’t seem to work when I put it on the webflow page. Could you help with that?

Also, would it be easier to implement such a component directly in webflow? If so, how can I achieve it?

Thank you for your quick response.