Skip to content

Instantly share code, notes, and snippets.

@mfrancois3k
Created June 14, 2023 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfrancois3k/9bee56f6a5baa86352e41dc5f7128586 to your computer and use it in GitHub Desktop.
Save mfrancois3k/9bee56f6a5baa86352e41dc5f7128586 to your computer and use it in GitHub Desktop.
cursor effect #awwwards #CSS
/* #Cursor
================================================== */
.cursor,
.cursor2,
.cursor3{
position: fixed;
border-radius: 50%;
transform: translateX(-50%) translateY(-50%);
pointer-events: none;
left: -100px;
top: 50%;
mix-blend-mode: difference;
-webkit-transition: all 300ms linear;
transition: all 300ms linear;
}
.cursor{
background-color: #fff;
height: 0;
width: 0;
z-index: 99999;
}
.cursor2,.cursor3{
height: 36px;
width: 36px;
z-index:99998;
-webkit-transition:all 0.3s ease-out;
transition:all 0.3s ease-out
}
.cursor2.hover,
.cursor3.hover{
-webkit-transform:scale(2) translateX(-25%) translateY(-25%);
transform:scale(2) translateX(-25%) translateY(-25%);
border:none
}
.cursor2{
border: 2px solid #fff;
box-shadow: 0 0 22px rgba(255, 255, 255, 0.6);
}
.cursor2.hover{
background: rgba(255,255,255,1);
box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}
@media screen and (max-width: 1200px){
.cursor,.cursor2,.cursor3{
display: none
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment