Created
June 14, 2023 06:08
-
-
Save mfrancois3k/9bee56f6a5baa86352e41dc5f7128586 to your computer and use it in GitHub Desktop.
cursor effect #awwwards #CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* #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