Skip to content

Instantly share code, notes, and snippets.

@ilovejs
Last active August 29, 2015 14:09
Show Gist options
  • Save ilovejs/303abee87d103923cd65 to your computer and use it in GitHub Desktop.
Save ilovejs/303abee87d103923cd65 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#preview {
/* position: relative;
background: #333;
color: #fff;
float: left;
width: 268px;
height: 268px;
margin: 0 20px 20px 0;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;*/
width: 268px;
height: 268px;
margin: 0 20px 20px 0;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
</style>
</head>
<body>
<div id="preview"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://rawgit.com/fgnass/spin.js/master/spin.js" ></script>
<script type="text/javascript">
var opts = {
lines: 10, // The number of lines to draw
length: 20, // The length of each line
width: 10, // The line thickness
radius: 20, // The radius of the inner circle
corners: 1, // Corner roundness (0..1)
rotate: 0, // The rotation offset
direction: 1, // 1: clockwise, -1: counterclockwise
color: '#000', // #rgb or #rrggbb or array of colors
speed: 1, // Rounds per second
trail: 60, // Afterglow percentage
shadow: false, // Whether to render a shadow
hwaccel: false, // Whether to use hardware acceleration
className: 'spinner', // The CSS class to assign to the spinner
zIndex: 2e9, // The z-index (defaults to 2000000000)
top: '50%', // Top position relative to parent
left: '50%' // Left position relative to parent
};
var target = document.getElementById('preview');
var spinner = new Spinner(opts).spin(target);
// $('#preview').spin(opts);
setTimeOut
</script>
</body>
</html>
@ilovejs
Copy link
Author

ilovejs commented Nov 15, 2014

rawgit.com/{URL}.............. to preview in broswer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment