Skip to content

Instantly share code, notes, and snippets.

@takuma7
Created June 20, 2015 06:24
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 takuma7/5334e84651d3ff50ca6e to your computer and use it in GitHub Desktop.
Save takuma7/5334e84651d3ff50ca6e to your computer and use it in GitHub Desktop.
WvZzyY
<div id="wrapper">
<div id="circle-cursor" class="circle"></div>
<div id="circle-fixed" class="circle"></div>
</div>
$(document).on('mousemove', function(e){
$('#circle-cursor')
.css('left', e.pageX - 50)
.css('top', e.pageY - 50);
});
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
#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