我有這樣的代碼如何讓Spin.js微調器在停止之前延遲?
var opts = {
lines: 11, // The number of lines to draw
length: 28, // The length of each line
width: 25, // The line thickness
radius: 35, // 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.3, // Rounds per second
trail: 61, // 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: 'auto', // Top position relative to parent in px
left: 'auto' // Left position relative to parent in px
};
然後我打電話微調這樣的:
var target = document.getElementById('foo');
var spinner = new Spinner(opts).spin(target);
//do other stuff here
spinner.stop();
但我希望延遲微調它停止之前的某個時候。如何實現這一目標?任何幫助表示讚賞。
你究竟是什麼意思延遲?你希望它旋轉至少x秒? – Liath
@ Lath是的,這就是我想要它做的 – n00b