<div class="wrapper">
  
  <h2 class="my-element">Howdy!</h2>
  
  <div class="circle"></div>
  
</div>
*, *:before, *:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    scroll-behavior: smooth;
    font-synthesis: none;
}
.wrapper{
  position:relative;
  height:100vh;
  background:#a81f1f;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
h2{
  color:white;
  position:absolute;
  font-size:60px;
  z-index:30
}

.circle{
  position:absolute;
  width:300px;
  height:300px;
  background:#fff;
  z-index:20;
  border-radius:50%;
 transform: translate(calc(50%-150px), calc(50%-150px));
  filter: blur(180px)
  
}
const animation = new PerlinDOM({
  element: document.querySelector('.my-element'),
  x: { min: -150, max: 150 },  // Horizontal movement range in pixels
  y: { min: -150, max: 150 },  // Vertical movement range in pixels
  speed: 0.0008,               // Animation speed
  seed: .2                  // Seed for the noise generator
});

const circle = new PerlinDOM({
  element: document.querySelector('.circle'),
  x: { min: -150, max: 150 },  // Horizontal movement range in pixels
  y: { min: -150, max: 150 },  // Vertical movement range in pixels
  speed: 0.002,               // Animation speed
  seed: 1                  // Seed for the noise generator
});
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdn.jsdelivr.net/npm/@andresclua/perlindom/dist/PerlinDOM.umd.js