Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div id="cont"></div>
<div class="pointer"></div>
              
            
!

CSS

              
                body{
  padding: 0;
  background: black;
  overflow: hidden;
}
*{
  cursor: none;
}
.a, .b{
  position: absolute;
  height: 40px;
  transform-origin: left;
  translate: 0 -20px;
  padding-left: 20px;
  font-family: sans-serif;
  white-space: nowrap;
  overflow: hidden;
}
.a{
  color: darkgrey;
  background: white;
}
.b{
  color: black;
  background: darkgrey;
  border-radius: 20px 0 0 20px;
}
.a:after, .b:after{
  font-size: 1.3em;
  position: absolute;
  height: 100%;
  font-weight: 900;
  content: "HOVER EXP\2007🞀🞀🞀\2007🞀🞀🞀\2007🞀🞀🞀\2001\2001\2001\2001\2005HOVER EXP\2007🞀🞀🞀\2007🞀🞀🞀\2007🞀🞀🞀\2001\2001\2001\2001\2005HOVER EXP\2007🞀🞀🞀\2007🞀🞀🞀\2007🞀🞀🞀\2001\2001\2001\2001\2005HOVER EXP\2007🞀🞀🞀\2007🞀🞀🞀\2007🞀🞀🞀\2001\2001\2001\2001\2005HOVER EXP\2007🞀🞀🞀\2007🞀🞀🞀\2007🞀🞀🞀\2001\2001\2001\2001\2005HOVER EXP\2007🞀🞀🞀\2007🞀🞀🞀\2007🞀🞀🞀\2001\2001\2001\2001\2005HOVER EXP\2007🞀🞀🞀\2007🞀🞀🞀\2007🞀🞀🞀\2001\2001\2001\2001\2005HOVER EXP\2007🞀🞀🞀\2007🞀🞀🞀\2007🞀🞀🞀\2001\2001\2001\2001\2005";
  left: 0px;
}
.a:after{
  background: repeating-linear-gradient(145deg, transparent 0 180px, darkgrey 180px 183px, white 183px 186px, darkgrey 186px 189px, white 189px 192px, darkgrey 192px 195px, white 195px 198px, darkgrey 198px 201px, white 201px 204px, darkgrey 204px 207px, transparent 207px 209px);
  animation: hovera 10s infinite linear;
}
.b:after{
  background: repeating-linear-gradient(145deg, transparent 0 180px, black 180px 183px, darkgrey 183px 186px, black 186px 189px, darkgrey 189px 192px, black 192px 195px, darkgrey 195px 198px, black 198px 201px, darkgrey 201px 204px, black 204px 207px, transparent 207px 209px);
  animation: hoverb 10s infinite linear;
}
.a:before, .b:before{
  position: absolute;
  font-size: 0.5em;
  content: "BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 BY THE TIRED SUZ SIRUNYAN\2001●\2001 ";
  font-weight: 700;
  top: 28px;
}
.a:before{
  animation: suza 10s infinite linear;
}
.b:before{
  animation: suzb 10s infinite linear;
}
@keyframes hovera{
  from {left: 0px;}
  to {left: -363.5px;}
}
@keyframes hoverb{
  from {left: -363.5px;}
  to {left: 0px;}
}
@keyframes suza{
  from{left: -276px;}
  to{left: 0px;}
}
@keyframes suzb{
  from{left: 0px;}
  to{left: -276px;}
}
.pointer{
  position: absolute;
  background: #E7C683;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  left: calc(var(--x) - 10px);
  top: calc(var(--y) - 10px);
  pointer-events: none;
  z-index: 1000;
}
              
            
!

JS

              
                let x = 0;
let y = 0;
let xs = 0;
let ys = 0;
let first = true;
let finished = false;
let lastRibbon;
let ribbon;
let front = false;
let angle = 0;
let lastAngle;
let z = 0;
document.addEventListener("click", e => stop(e))
document.addEventListener("mousemove", e => {
  if (finished) {
    finished = false;
    if (!front && lastRibbon) lastRibbon.style.borderRadius = "20px"
    front = !front;
    z += front ? 2 : -1;
    ribbon = document.createElement("div");
    ribbon.classList.add(front ? "a" : "b");
    ribbon.style.zIndex = z;
    document.getElementById("cont").appendChild(ribbon);
  }
  if (ribbon) {
    angle = Math.atan2(e.clientY - ys, e.clientX - xs) * 180 / Math.PI;
    const pa = e.clientX - xs;
    const pb = e.clientY - ys;
    const distance = Math.sqrt( pa*pa + pb*pb );
    ribbon.style.width = distance + "px";
    x = Math.round(Math.cos(angle * Math.PI / 180) * (distance - 40) + xs);
    y = Math.round(Math.sin(angle * Math.PI / 180) * (distance - 40) + ys);
    if (angle > -90 && angle < 90){
      const nx = Math.round(Math.cos(angle * Math.PI / 180) * (20 - distance) + x);
      const ny = Math.round(Math.sin(angle * Math.PI / 180) * (20 - distance) + y);
      ribbon.style.left = nx + "px";
      ribbon.style.top = ny + "px";
      ribbon.style.rotate = angle + "deg";
      if (!front) ribbon.style.borderRadius = "20px 0 0 20px"
    }
    else{
      const nx = Math.round(Math.cos(angle * Math.PI / 180) * (40) + x);
      const ny = Math.round(Math.sin(angle * Math.PI / 180) * (40) + y);
      ribbon.style.rotate = angle - 180 + "deg";
      ribbon.style.left = nx + "px";
      ribbon.style.top = ny + "px";
      if (!front) ribbon.style.borderRadius = "0 20px 20px 0"
    }
  }
  document.documentElement.style.setProperty('--x', e.clientX + 'px');
  document.documentElement.style.setProperty('--y', e.clientY + 'px');
})
function stop(e){
  if (first){
    x = e.clientX;
    y = e.clientY;
    first = false;
  }
  finished = true;
  xs = Math.round(Math.cos(angle * Math.PI / 180) * 20 + x);
  ys = Math.round(Math.sin(angle * Math.PI / 180) * 20 + y);
  lastAngle = angle;
  lastRibbon = ribbon;
  ribbon = '';
}
              
            
!
999px

Console