A Pen by Takuma YOSHITANI on CodePen.
Created
June 20, 2015 06:24
-
-
Save takuma7/5334e84651d3ff50ca6e to your computer and use it in GitHub Desktop.
WvZzyY
This file contains 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
<div id="wrapper"> | |
<div id="circle-cursor" class="circle"></div> | |
<div id="circle-fixed" class="circle"></div> | |
</div> |
This file contains 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
$(document).on('mousemove', function(e){ | |
$('#circle-cursor') | |
.css('left', e.pageX - 50) | |
.css('top', e.pageY - 50); | |
}); |
This file contains 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
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
This file contains 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
#wrapper { | |
-webkit-filter: contrast(100); | |
filter: contrast(100); | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
top: 0; left: 0; right: 0; bottom: 0; | |
background: #fff; | |
} | |
.circle { | |
width: 100px; | |
height: 100px; | |
border-radius: 50px; | |
background: #09e; | |
-webkit-filter: blur(25px); | |
filter: blur(25px); | |
} | |
#circle-cursor { | |
position: absolute; | |
top: 0; left: 0; | |
} | |
#circle-fixed { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment