Embed simple javascript code

Try this:

And this:

Also read Particles.js docs.

codepen

In general codepen to webflow:

The html box (You should create this structure by webflow site tree) and add classes and #id like the example you find
The CSS box - you should add the CSS (copy paste) and wrap with <style></style> + If the “box” is sccs (SASS) you should first use [SCSS to CSS Compiler] (https://www.cssportal.com/scss-to-css/) - (Or create the same styles/ideas by webflow CSS).
The JS box - copy paste before body and wrap with <script>/*code her*/</script> tag

External resources JS -or- CSS:
image

wrap with script and src - example:

<script src="https://cldup.com/S6Ptkwu_qA.js"></script>

For the CSS the same idea but other syntax:
image

image

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.1/css/swiper.min.css">

Always put the src “before” the code you copy-paste from the JS-box (The asset should load first) + Do not load jquery (Webflow already load this libary)

6 Likes