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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              

<section>
 <div id="cursor">
  <div id="circle-hover"></div>
  <div id="circle"></div>
</div>
  
<h1>Finding an <span class="hidden-text" id="t-takahe">‘Extinct’</span> New Zealand Bird</h1>

  <h2>Reappearance of the <a href="https://www.kez.ie">Colourful Bird</a></h2>

<p>In New Zealand's rugged Fiordland a bird thought extinct for fifty years is struggling for survival. Behind the rare species in its fight for life is all the protective power of the Dominion Government.</p>

<p>Rediscovery of this flightless bird, the large, brilliant-hued native rail which the <span class="hidden-text" id="t-takahea">Maoris called <i>takahea</i></span>, excited almost as much interest in New Zealand as discovery of a living passenger pigeon would arouse in America.</p>

<img src="https://78.media.tumblr.com/ac435d51df5e9c11648569c0b7dbb0d6/tumblr_p6tirlj7FO1vh1oabo4_540.png" alt="reveal test" title="reveal test" />
</section>

<div class="revealer"></div>
            
          
!
            
              /*
animated cursor replacement:
https://css-tricks.com/using-css-cursors/

follow cursor:
https://danielcwilson.com/blog/2018/02/optical-fun-red-reveal/

overlap:
https://codepen.io/danwilson/pen/rJgVvK/

Cursor alternative:
https://codepen.io/tajdid/project/editor/XxxpOz
*/

/*

:root {
  --reveal: #ec008c;
  --whatisit: hsla(180, 100%, 50%, .35);
  --overlay-blend: multiply;
  --overlay-opacity: .8;
}

.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%;
  
  background: var(--reveal);
  
  mix-blend-mode: var(--overlay-blend);
  opacity: var(--overlay-opacity);
}
*/

#circle-hover {
  display: block;
  position: absolute;
  transition: all .02s linear;/*Change the time here depending on how fast you want the big circle to follow the cursor */
  transition: transform 0.5 ease-in-out;
  width: 150px;
  height: 150px;
  margin-top: -75px;
  margin-left: -75px;
  z-index: 2;
  text-align: center;
  border: 1px solid #ec008c;
  border-radius: 50%;
  transform: scale(.5);
  background: transparent;
}

#circle {
  display: block;
  position: absolute;
  margin: auto;
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  background-color: #7950F2;
  border-radius: 50%;
  z-index: 1;
   background-color: #ec008c;
  mix-blend-mode: multiply;
  opacity: .8;
}

#cursor.on-link #circle-hover {
  transform: scale(1);
  background: rgba(#ec008c, 1);
  opacity: .3;
}


body {
  width: 70%;
  margin: auto;
  /*background-color: #00aeef; */
  color: #302f30;
}

a:hover {
  cursor: pointer;
}

a {
  z-index: 100;
  position: relative;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.998em;
  color: #ec008c;
}

h2 {
    font-family: 'Oswald', sans-serif;
  font-size: 1.999em;
    color: #ec008c;
}

p {
    font-family: 'Lora', serif;
  font-size: 1em;
  line-height: 1.65em;
}

/*
section {
  border: 1px solid #00aeef;
  padding: 1em;
  transform: rotate(2deg);
   background-color: #f4f2f2;
}
*/

img {
  transform: rotate(5deg);
      -webkit-box-shadow: 4px 7px 14px 0px rgba(0,0,0,0.15);
    -moz-box-shadow: 4px 7px 14px 0px rgba(0,0,0,0.15);
    box-shadow: 4px 7px 14px 0px rgba(0,0,0,0.15);
}

.hidden-text {
    color: #ec008c;
}

.hidden-text::after {
  display: inline-block;
  color: #00aeef;
  opacity: 0.4;
  font-style: italic;
  transform: translateX(-100%);
  position: absolute;
}

/*
.hidden-text::before {
  display: inline-block;
  color: #ec008c;
  content: '‘Extinct’';
  transform: translateX(50%);
}

.hidden-text {
  margin-left: -1.75em;
  margin-right: -1.5em;
}
*/

#t-takahe::after {
    content: 'Takahe';
}

#t-takahea::after {
    content: '“wandering at large”';
}
            
          
!
            
              /*
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);
}

*/

$('body').mouseover(function() {
  $(this).css({
    cursor: 'none'
  });
});

$(document).on('mousemove', function(e) {
  $('#circle-hover').css({
    left: e.pageX,
    top: e.pageY
  });
  $('#circle').css({
    left: e.pageX,
    top: e.pageY
  });
});
$('a').mouseover(function() {
  $('#cursor').addClass('on-link');
})
$('a').mouseout(function() {
  $('#cursor').removeClass('on-link');
})
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console