1

我不能发布我的所有代码,但我会展示其中的大部分。

因此,这些是我处理微调器功能的代码片段。它让我看到微调器,但它不旋转。我有一些代码也可以停止微调器,但我已经把它拿出来了,它仍然没有旋转它只是显示微调器冻结。有任何想法吗?我一直在看这个,我无法确定我的问题出在哪里。也许它与在 asp.net 中使用它有关。我的文件中也有 spinmin.js 的脚本,但这里没有显示。

//aspx
<div id="waitDiv" class="divWait" ></div>

//css
.divWait { text-align: center; width: 950px; height: 190px; }

//javascript
var spinner;

function doSpinner() {
            var opts = createSpinnerOpts();
            var target = document.getElementById('waitDiv');
            if (typeof(spinner) == 'undefined') {
                spinner = new Spinner(opts).spin(target);
            }

}

function createSpinnerOpts() {
            var opts = {
                lines: 13, // The number of lines to draw
                length: 7, // The length of each line
                width: 8, // The line thickness
                radius: 40, // The radius of the inner circle
                corners: 1, // Corner roundness (0..1)
                rotate: 89, // The rotation offset
                color: '#000', // #rgb or #rrggbb
                speed: 0.5, // Rounds per second
                trail: 100, // Afterglow percentage
                shadow: true, // Whether to render a shadow
                hwaccel: true, // 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
            };
            return opts;
        }
4

1 回答 1

1

好吧,我是今天的傻瓜。将微调器添加为类,它将旋转....

<div id="waitDiv" class="spinner" ></div>
于 2012-10-26T22:23:48.790 回答