cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

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.

            
              <div class="hidden"></div>
<div class="noise"></div>
<div class="revealer"></div>
            
          
!
            
              :root {
  --reveal: hsl(0, 100%, 50%);
  --whatisit: hsla(180, 100%, 50%, .35);
  --overlay-blend: multiply;
  --overlay-opacity: .8;
}

/* Create a "lens" that consists of a red circle and a blend mode of multiply... once blended with anything below that is cyan, then the red of this element and the cyan on the layer below will multiply and be effectively black */
.revealer {
  --x: 0vw;
  --y: 50vmin;
  width: 50vmin;
  height: 50vmin;
  position: absolute;
  top: 0;
  left: 0vw;
  transform: translate(calc(var(--x) - 25vmin), calc(var(--y) - 40vmin));
  border-radius: 50%;
  border: 1.5vmin solid black;
  
  background: var(--reveal);
  
  mix-blend-mode: var(--overlay-blend);
  opacity: var(--overlay-opacity);
}


/* Take a black/dark pencil/ink drawing on white paper... */
.hidden {
  width: 100%;
  height: 100vh;
  background: #fff center center no-repeat;
/*   background-image: 
    radial-gradient(circle, #fff, transparent 10%),
    url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/61811/signsofsatx1.jpg);
  background-size: auto auto, contain; */
  opacity: .75;
}

.hidden::before {
  background: #fff center center no-repeat;
  background-image: 
    radial-gradient(circle, #fff, transparent 10%),
    url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/61811/signsofsatx1.jpg);
  background-size: auto auto, contain;
  filter: grayscale(100%);
  opacity: 1;
}

/* ... and blend it with a block of cyan to make the pencil/ink lines cyan */
.hidden::before,
.hidden::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.hidden::after {
  background: hsla(180, 100%, 50%, 1);
  mix-blend-mode: screen;
  z-index: 1;
}
.noise {
  --start: 5px;
  --end: 7px;
  background: 
    repeating-linear-gradient(155deg,
      transparent 0, 
      transparent var(--start), 
      var(--reveal) var(--start), 
      var(--reveal) var(--end)),
    repeating-linear-gradient(115deg,
      transparent 0, 
      transparent var(--start), 
      var(--reveal) var(--start), 
      var(--reveal) var(--end)),
    repeating-linear-gradient(45deg,
      transparent 0, 
      transparent var(--start), 
      var(--reveal) var(--start), 
      var(--reveal) var(--end));
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  alignItems: center;
  justifyItems: center;
  color: var(--reveal);
  opacity: .5;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  perspective: 1000px;
  
}
*, *::before, *::after {
  box-sizing: border-box;
}

/*
body > * {
  transform: rotateX(0deg) var(--tz);
}

body > *:first-child {
  --tz: translateZ(-50px);
}
body > *:nth-child(2) {
  --tz: translateZ(-25px);
}
body > *:nth-child(3) {
  --tz: translateZ(0px);
}
/**/
            
          
!
            
              var message = document.querySelector('p');
var revealer = document.querySelector('.revealer');

function move(e) {
  e.preventDefault();
  if (e.clientX || e.touches) {
    let x = (e.clientX || e.touches[0].clientX);
    let y = (e.clientY || e.touches[0].clientY);
    //x = Math.max(0, x);
    revealer.style.setProperty('--x', x +'px');
    revealer.style.setProperty('--y', y +'px');
  }
}

if (window.PointerEvent) {
  document.body.addEventListener('pointermove', move);
} else {
  document.body.addEventListener('touchmove', move);
  document.body.addEventListener('mousemove', move);
}

            
          
!
999px
Loading ..................

Console