Check out the following HTML code snippet showcasing intricate styling and JQuery functionality. Be sure to expand your browser window for optimal viewing of the animation.
<!DOCTYPE HTML>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<style type="text/css">
#sun
{
position: absolute;
top: 50%;
left: 50%;
margin-top: -200px;
margin-left: -200px;
width: 400px;
height: 400px;
background: yellow;
border-radius: 200px;
background-image: -moz-radial-gradient(45px 45px 60deg, circle cover, yellow 0%, orange 100%, red 95%);
background-image: -webkit-radial-gradient(45px 45px, circle cover, yellow, orange);
background-image: radial-gradient(45px 45px 60deg, circle cover, yellow 0%, orange 100%, red 95%);
}
.ray
{
border-radius: 50%;
width: 30px;
height: 30px;
background-color: orange;
display: block;
position: absolute;
overflow: hidden;
top: 50%;
left: 50%;
margin: -15px;
}
#one { transform: rotate(-45deg) translate(215px); }
#two { transform: rotate(-90deg) translate(215px); }
#three { transform: rotate(-135deg) translate(215px); }
#four { transform: rotate(-180deg) translate(215px); }
#five { transform: rotate(-225deg) translate(215px); }
#six { transform: rotate(-270deg) translate(215px); }
#seven { transform: rotate(-315deg) translate(215px); }
#eight { transform: rotate(-360deg) translate(215px); }
</style>
</head>
<body>
<div id="sun"></div>
<div id="one" class="ray"></div>
<div id="two" class="ray"></div>
<div id="three" class="ray"></div>
<div id="four" class="ray"></div>
<div id="five" class="ray"></div>
<div id="six" class="ray"></div>
<div id="seven" class="ray"></div>
<div id="eight" class="ray"></div>
</div>
<script type="text/javascript">
function movement() {
$("#two").animate({top: '-=50'}, 300);
$("#three").animate({top: '-=35.35', left: '-=35.35'}, 300);
$("#four").animate({left: '-=50'}, 300);
$("#five").animate({top: '+=35.35', left: '-=35.35'}, 300);
$("#six").animate({top: '+=50'}, 300);
$("#seven").animate({top: '+=35.35', left: '+=35.35'}, 300);
$("#eight").animate({left: '+=50'}, 300);
$("#one").animate({top: '-=35.35', left: '+=35.35'}, 300);
//Reverse Animation
$("#two").animate({top: '+=50'}, 450);
$("#three").animate({top: '+=35.35', left: '+=35.35'}, 450);
$("#four").animate({left: '+=50'}, 450);
$("#five").animate({top: '-=35.35', left: '+=35.35'}, 450);
$("#six").animate({top: '-=50'}, 450);
$("#seven").animate({top: '-=35.35', left: '-=35.35'}, 450);
$("#eight").animate({left: '-=50'}, 450);
$("#one").animate({top: '+=35.35', left: '-=35.35'}, 450);
setTimeout(movement, 750);
}
$(document).ready(function() {
movement();
});
</script>
</body>
</html>