Jump to content

inverted dot cursor

Recommended Posts

Posted

Site URL: http://minimist.ca

howdy all,

I wanted to replicate this inverted dot cursor. my site is white and not black background. I've tried copy and paste all of this into code injection with no avail. and I've changed the colors from #fffff to #00000 and still nope. anyone have any input they can spare for me please

<style>
  @media (hover: none) {
    .cursor {display:none !important;
    }
  }
  * {
    cursor: none;
  }
  .cursor {
    --size: 30px;
    height: var(--size);
    width:  var(--size);
    border-radius: 50%;
    position: absolute;
    z-index: 99999999999;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  .cursor.cursor-dot {
    background: #ffffff;  /* This defines the color of the cursor */
    mix-blend-mode: difference;  /* Delete this line if you dont want the circle to invert */
    transition: width .3s, height .3s,
      background-color .3s;
    transition-timing-function: ease-out;
  }
  .cursor-dot.active {
    --size: 50px;
    background-color: #ffffff;
  }
</style>
<script>
  $(window).mousemove(function(e) {     
    $(".cursor").css({
      left: e.pageX,
      top: e.pageY
    })    
  });
  $(window).mousemove(function(e) {
    $("a")
      .on("mouseenter", function() {   
      $('.cursor').addClass("active")   
    })  
  });
  $(window).mousemove(function(e) {
    $("a")
      .on("mouseleave", function() {    
      $('.cursor').removeClass("active")    
    })
  });
</script>
  • Replies 7
  • Views 2.3k
  • Created
  • Last Reply
Posted
6 hours ago, Jprood said:

Nope not yet 😞

any idea on what or where wrong im placing the code ? ive tried it all in injection and ive tried script in injection and the style in the custom css. all ive acomplished so far is just making the cursor disapear completely lol

Posted
3 hours ago, creedon said:

It appears to be functioning to me.

1599717776_ScreenShot2020-10-30at2_33_46PM.png.32c8975808872138111e9a7edfbc1aea.png

447952220_ScreenShot2020-10-30at2_33_59PM.png.f594157108131287a9b07b641dc3aed8.png

What browser are you using? I'm on Chrome on Mac. It also looked OK on Safari.

thats not my site. thats just where i borrowed the code from. Im trying to implement it on my site www.fitaf.co but cant seen to get that bit of code to work. when i paste all the code into my code injection and change the color since his site is blk and mine is white all i seem to do is just make the cursor invisable

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.