Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<style>
* {
margin: 0px;
padding: 0px;
}
html, body {
width: 100%;
height: 100%;
}
.cube{
width: 200px;
height: 200px;
position: absolute;
background: orange;
border: 2px solid black;
box-shadow: inset 0px 0px 30px rgba(0, 0, 0, 0.6);
}
</style>
</head>
<body>
<script>
$(document).ready(function () {
$(function(){
$(window).mousemove(function(e){
$('.cube').css('transform', 'rotateX(' + - e.pageY + 'deg)' + 'rotateY(' + e.pageX + 'deg)');
});
})
});
</script>
<div class="cube"></div>
</body>
</html>
The most helpful HTML solutions