Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                  <div class="feature" id="featureAnimation">
    <div id="featureBackground"></div>



                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: uniwars,sans-serif;
  font-weight: 600;
  font-style: italic;
  overflow-x: hidden;
  overflow-y: hidden;
  background-color: #E0804D;

#featureAnimation {

  position: fixed;
  width: 800px;
  height: 600px;
  left: 0px;
  bottom: 0vh;
  border-radius: 2px;
  border-style: solid;
  border-color: white;

.dot {
  position: absolute;
  background-color: #91e600;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  will-change: transform;



let dots = [],
	bg = document.querySelector("#featureBackground"), i, dot;

// grabs a certain number of dots from the dots Array, but only if they're not active (animating). If it can't find any, it'll create some new ones and shove them into the dots Array. It's like a pooling system that reuses elements when they're not in use (better performance)
function activateDots(quantity) {
  let result = [],
      dot, i;
  for (i = 0; result.length < quantity; i++) {
    dot = dots[i];
    if (!dot || dot.isActive) {
      dot = document.createElement("div");
      dot.setAttribute("class", "dot");
    dot.isActive = true;
  gsap.set(result, {
    backgroundColor: "random([#F56D24,#F56D34,#F56E34,#F66D34,#F56D54])",
    scale: "random(0.4, 1)",
  return result;

function animate() {
  const newDots = activateDots(5);, {
    duration: 3,
    physics2D: {
      velocity: "random(200, 650)",
      angle: "random(230, 300)",
      gravity: 600
    onComplete() {
      // deactivate the dots now that we're done with them, so they can be reused.
      newDots.forEach(el => el.isActive = false);

document.querySelector('#featureAnimation').addEventListener("mouseenter", animate);