1
我需要你的幫助,朋友,爲ajax請求創建加載微調器。它看起來像這樣:working sample video製作加載微調器
下面是微調
這是該微調的CSS的HTML:
$(document).ready(function() {
\t $loading_indicator = $(document).find('.loading-indicator');
\t $loading_indicator.addClass('active');
\t $loading_indicator.removeClass('active');
});
.loading-indicator {
width: 40px;
height: 40px;
background-color: #ddd;
border-radius: 100%;
-webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
animation: sk-scaleout 1.0s infinite ease-in-out;
visibility: hidden;
opacity: 0;
transition: opacity 0.2s linear, visibility 2s ease;
position: absolute;
top: 0;
margin: 0 auto;
left: 0;
right: 0;
}
.loading-indicator.active {
visibility: visible;
opacity: 1;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="loading-indicator" style=""></div>
請幫我做它的工作, ,因爲我希望它閃爍像在視頻 而阿賈克斯請求正在處理
在'Ajax請求的success'回調對'Form'提交和刪除類添加類。 – Manwal
鏈接將提供幫助:https://connoratherton.com/loaders –