Skip to content

Instantly share code, notes, and snippets.

@ishankhare07
Created April 19, 2015 13:47
Show Gist options
  • Save ishankhare07/052f7dad8dc560112d04 to your computer and use it in GitHub Desktop.
Save ishankhare07/052f7dad8dc560112d04 to your computer and use it in GitHub Desktop.
oXvpLb
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<div class="gradient">
</div>
$(document).mousemove(function (event) {
var xPos = event.pageX;
var yPos = event.pageY;
$('html').css({
background : "radial-gradient(circle 200px at " + String(parseInt(xPos)) + "px " + String(parseInt(yPos)) + "px, rgba(255,255,255,0), black)"
});
})
html {
height: 100%;
background-color: white;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment