1 html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote,
2 pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd,
3 q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt,
4 dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot,
5 thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption,
6 footer, header, hgroup, menu, nav, output, ruby, section, summary, time,
7 mark, audio, video {
8 margin: 0;
9 padding: 0;
10 border: 0;
11 }
12
13 article, aside, details, figcaption, figure, footer, header, hgroup,
14 menu, nav, section {
15 display: block
16 }
17
18 body {
19 line-height: 1
20 }
21
22 ol, ul {
23 list-style: none
24 }
25
26 blockquote, q {
27 quotes: none
28 }
29
30 blockquote:before, blockquote:after, q:before, q:after {
31 content: '';
32 content: none
33 }
34
35 table {
36 border-collapse: collapse;
37 border-spacing: 0
38 }

reset.css

  1 /* BODY {
2 background: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 52%), -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 52%);
3 background: linear-gradient(45deg, rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 52%), linear-gradient(-45deg, rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 52%);
4 -webkit-background-size: 1em 1em;
5 background-size: 1em 1em;
6 background-color: #000;
7 } */
8
9 .l-wrapper {
10 position: absolute;
11 width: 480px;
12 height: 300px;
13 top: 0;
14 right: 0;
15 bottom: 0;
16 left: 0;
17 margin: auto;
18 text-align: center;
19 }
20
21 svg {
22 height: 120px;
23 width: 120px;
24 margin: 0 2em 2em;
25 overflow: visible;
26 /* border: 1px solid red; */
27 }
28
29 .g-circles {
30 -webkit-transform: scale(0.9) translate(7px, 7px);
31 -ms-transform: scale(0.9) translate(7px, 7px);
32 transform: scale(0.9) translate(7px, 7px);
33 }
34
35 circle {
36 fill: dodgerblue;
37 fill-opacity: 0;
38 -webkit-animation: opacity 1.2s linear infinite;
39 animation: opacity 1.2s linear infinite;
40 }
41 circle:nth-child(12n + 1) {
42 -webkit-animation-delay: -0.1s;
43 animation-delay: -0.1s;
44 }
45 circle:nth-child(12n + 2) {
46 -webkit-animation-delay: -0.2s;
47 animation-delay: -0.2s;
48 }
49 circle:nth-child(12n + 3) {
50 -webkit-animation-delay: -0.3s;
51 animation-delay: -0.3s;
52 }
53 circle:nth-child(12n + 4) {
54 -webkit-animation-delay: -0.4s;
55 animation-delay: -0.4s;
56 }
57 circle:nth-child(12n + 5) {
58 -webkit-animation-delay: -0.5s;
59 animation-delay: -0.5s;
60 }
61 circle:nth-child(12n + 6) {
62 -webkit-animation-delay: -0.6s;
63 animation-delay: -0.6s;
64 }
65 circle:nth-child(12n + 7) {
66 -webkit-animation-delay: -0.7s;
67 animation-delay: -0.7s;
68 }
69 circle:nth-child(12n + 8) {
70 -webkit-animation-delay: -0.8s;
71 animation-delay: -0.8s;
72 }
73 circle:nth-child(12n + 9) {
74 -webkit-animation-delay: -0.9s;
75 animation-delay: -0.9s;
76 }
77 circle:nth-child(12n + 10) {
78 -webkit-animation-delay: -1s;
79 animation-delay: -1s;
80 }
81 circle:nth-child(12n + 11) {
82 -webkit-animation-delay: -1.1s;
83 animation-delay: -1.1s;
84 }
85 circle:nth-child(12n + 12) {
86 -webkit-animation-delay: -1.2s;
87 animation-delay: -1.2s;
88 }
89
90 .g-circles--v2 circle {
91 fill-opacity: 0;
92 stroke-opacity: 0;
93 stroke-width: 1;
94 stroke: yellowgreen;
95 -webkit-animation-name: opacity-stroke, colors, colors-stroke, transform-2;
96 animation-name: opacity-stroke, colors, colors-stroke, transform-2;
97 }
98
99 .g-circles--v3 circle {
100 fill-opacity: 1;
101 -webkit-animation-name: opacity, colors;
102 animation-name: opacity, colors;
103 }
104
105 .g-circles--v4 circle {
106 fill-opacity: 1;
107 fill: orange;
108 -webkit-transform-origin: 60px 60px;
109 -ms-transform-origin: 60px 60px;
110 transform-origin: 60px 60px;
111 -webkit-animation-name: opacity, colors-3, transform;
112 animation-name: opacity, colors-3, transform;
113 }
114
115 @-webkit-keyframes opacity {
116 3% {
117 fill-opacity: 1;
118 }
119
120 75% {
121 fill-opacity: 0;
122 }
123 }
124
125 @keyframes opacity {
126 3% {
127 fill-opacity: 1;
128 }
129
130 75% {
131 fill-opacity: 0;
132 }
133 }
134 @-webkit-keyframes opacity-stroke {
135 10% {
136 stroke-opacity: 1;
137 }
138
139 85% {
140 stroke-opacity: 0;
141 }
142 }
143 @keyframes opacity-stroke {
144 10% {
145 stroke-opacity: 1;
146 }
147
148 85% {
149 stroke-opacity: 0;
150 }
151 }
152 @-webkit-keyframes colors {
153 0% {
154 fill: yellowgreen;
155 }
156
157 10% {
158 fill: gold;
159 }
160
161 75% {
162 fill: crimson;
163 }
164 }
165 @keyframes colors {
166 0% {
167 fill: yellowgreen;
168 }
169
170 10% {
171 fill: gold;
172 }
173
174 75% {
175 fill: crimson;
176 }
177 }
178 @-webkit-keyframes colors-stroke {
179 0% {
180 stroke: yellowgreen;
181 }
182
183 10% {
184 stroke: gold;
185 }
186
187 75% {
188 stroke: crimson;
189 }
190 }
191 @keyframes colors-stroke {
192 0% {
193 stroke: yellowgreen;
194 }
195
196 10% {
197 stroke: gold;
198 }
199
200 75% {
201 stroke: crimson;
202 }
203 }
204 @-webkit-keyframes colors-2 {
205 0% {
206 fill: yellow;
207 }
208
209 50% {
210 fill: red;
211 }
212
213 65% {
214 fill: orangered;
215 }
216
217 95% {
218 fill: gold;
219 }
220 }
221 @keyframes colors-2 {
222 0% {
223 fill: yellow;
224 }
225
226 50% {
227 fill: red;
228 }
229
230 65% {
231 fill: orangered;
232 }
233
234 95% {
235 fill: gold;
236 }
237 }
238 @-webkit-keyframes colors-3 {
239 0% {
240 fill: yellowgreen;
241 }
242
243 50% {
244 fill: turquoise;
245 }
246
247 65% {
248 fill: yellow;
249 }
250
251 95% {
252 fill: orange;
253 }
254 }
255 @keyframes colors-3 {
256 0% {
257 fill: yellowgreen;
258 }
259
260 50% {
261 fill: turquoise;
262 }
263
264 65% {
265 fill: yellow;
266 }
267
268 95% {
269 fill: orange;
270 }
271 }
272 @-webkit-keyframes transform {
273 10% {
274 -webkit-transform: scale(0.75);
275 transform: scale(0.75);
276 }
277 }
278 @keyframes transform {
279 10% {
280 -webkit-transform: scale(0.75);
281 transform: scale(0.75);
282 }
283 }
284 @-webkit-keyframes transform-2 {
285 40% {
286 -webkit-transform: scale(0.85);
287 transform: scale(0.85);
288 }
289
290 60% {
291 stroke-width: 20;
292 }
293 }
294 @keyframes transform-2 {
295 40% {
296 -webkit-transform: scale(0.85);
297 transform: scale(0.85);
298 }
299
300 60% {
301 stroke-width: 20;
302 }
303 }

style.css

 1 <!DOCTYPE>
2 <html>
3 <head>
4 <meta charset="utf-8"><link rel="stylesheet" href="reset.css">
5 <link rel="stylesheet" href="style.css" media="screen" type="text/css">
6 </head>
7
8 <body>
9 <form class="form-horizontal " id="my_servers_id" method = 'post' >
10 {% csrf_token %}
11 <div id='table_server'style="overflow-y: auto; height: 300px;">
12 ...
13 ...
14 ...
15 </div>
16 <button class="btn btn-info" style="width:140px" type="button" onclick="ajax_loading('my_servers_id','{% url 'videomap-urls:check-user-servers-state' %}','start_server_id')" id='start_server_id' name='start_server_name' value='start_server' >
17 <i class="icon icon-play-circle"></i> Start </button>
18 </form>
19 <div class="l-wrapper" id='loading' style='width:200px;heigth:200px;display:none'>
20 <svg viewBox="0 0 120 120" >
21 <g id="circle" class="g-circles g-circles--v1">
22 <circle id="12" transform="translate(35, 16.698730) rotate(-30) translate(-35, -16.698730) " cx="35" cy="16.6987298" r="10"></circle>
23 <circle id="11" transform="translate(16.698730, 35) rotate(-60) translate(-16.698730, -35) " cx="16.6987298" cy="35" r="10"></circle>
24 <circle id="10" transform="translate(10, 60) rotate(-90) translate(-10, -60) " cx="10" cy="60" r="10"></circle>
25 <circle id="9" transform="translate(16.698730, 85) rotate(-120) translate(-16.698730, -85) " cx="16.6987298" cy="85" r="10"></circle>
26 <circle id="8" transform="translate(35, 103.301270) rotate(-150) translate(-35, -103.301270) " cx="35" cy="103.30127" r="10"></circle>
27 <circle id="7" cx="60" cy="110" r="10"></circle>
28 <circle id="6" transform="translate(85, 103.301270) rotate(-30) translate(-85, -103.301270) " cx="85" cy="103.30127" r="10"></circle>
29 <circle id="5" transform="translate(103.301270, 85) rotate(-60) translate(-103.301270, -85) " cx="103.30127" cy="85" r="10"></circle>
30 <circle id="4" transform="translate(110, 60) rotate(-90) translate(-110, -60) " cx="110" cy="60" r="10"></circle>
31 <circle id="3" transform="translate(103.301270, 35) rotate(-120) translate(-103.301270, -35) " cx="103.30127" cy="35" r="10"></circle>
32 <circle id="2" transform="translate(85, 16.698730) rotate(-150) translate(-85, -16.698730) " cx="85" cy="16.6987298" r="10"></circle>
33 <circle id="1" cx="60" cy="10" r="10"></circle>
34 </g>
35 </svg>
36 </div>
37 <script>
38 function ajax_loading(form_id,url,button_id){
39 if (button_id){
40 name=document.getElementById(button_id).name
41 value=document.getElementById(button_id).value
42 console.log(name,value)
43 need_data=$('#'+form_id).serialize()+'&{0}={1}'.format(name,value)
44 }else{
45 need_data=$('#'+form_id).serialize()
46 }
47 console.log(need_data)
48 document.getElementById('loading').style.display='block';
49 $.ajax({
50 url:url,
51 type:"post",
52 dataType: "html",
53 data:need_data,
54 success:function(mes){
55 $(document.body).html( mes);
56 }
57 })
58 }
59 </script>
60 </body>
61 </html>

通过ajax方式在界面上加载loading状态(仅作记录)的更多相关文章

  1. jQuery.ajax( options ) : 通过 HTTP 请求加载远程数据

    jQuery.ajax( options ) : 通过 HTTP 请求加载远程数据 这个是jQuery 的底层 AJAX 实现.简单易用的高层实现见 $.get, $.post 等. $.ajax() ...

  2. python如何从内存地址上加载pythn对象

    python如何从内存地址上加载pythn对象 在python中我们可以通过id函数来获取某个python对象的内存地址,或者可以通过调用对象的__repr__魔术函数来获取对象的详细信息 def t ...

  3. 界面动态加载时报NullPointException

    今天在做环境监测的模拟软件时,登陆页面报NullPointException 一般像我们初始化Button时,是Button btn=(Button)findViewById(R.id.button1 ...

  4. php+ajax实现登录按钮加载loading效果

    php+ajax实现登录按钮加载loading效果,一个提高用户体验,二个避免重复提交表单,ajax判断加载是否完成. 登录表单 <form onsubmit="return chec ...

  5. 谈谈加载(Loading)的那点事

    谈谈加载(Loading)的那点事 2013/10/12 | 分类: 设计 | 0 条评论 | 标签: 交互设计, 加载 分享到:33 原文出处: 搜狐焦点 对于加载(loading),想必大家都不陌 ...

  6. [Swift通天遁地]五、高级扩展-(11)图像加载Loading动画效果的自定义和缓存

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...

  7. React Native封装Toast与加载Loading组件

    React Native开发封装Toast与加载Loading组件 在App开发中,我们避免不了使用的两个组件,一个Toast,一个网络加载Loading,在RN开发中,也是一样,React Nati ...

  8. vue axios配置 发起请求加载loading请求结束关闭loading

    axios带有请求拦截器,避免在每个请求里面加loading重复操作,可以封装进去,在请求开始时加载loading层,请求结束关闭,loading层用vux的loading加载 axios.js im ...

  9. 基于jQuery的图片加载loading效果插件

    基于jQuery的图片加载loading效果插件 图片loading的效果是网页中比较常见的,尤其是对大图片,loading效果让用户能够明白图片加载的过程. 实现思路也是比较简单的: $.fn.Lo ...

随机推荐

  1. golang快速入门(四)

    提示:本系列文章适合有其他语音基础并对Go有持续冲动的读者 一.golang获取HTTP请求 1.在golang标准库中提供了net包来处理网络连接,通过http.Get创建http请求并返回服务器响 ...

  2. Jmeter- 笔记3 - Jmeter录制功能 / 抓包

    http代理服务器录制脚本: 1.新建线程组 2.添加 http代理服务器 元件 3.http代理服务器修改: 1)端口:8899,任意给个无占用的 2)目标控制器:改成刚刚新建的线程组.不改就录制会 ...

  3. Eclipse从SVN中检出项目缺少Jar包的问题

    Eclipse从SVN中检出项目缺少Jar包的问题

  4. 永远的Ace 实验五 团队作业2:XXX企业设施设备云上资料室

    项目 内容 课程班级博客链接 https://edu.cnblogs.com/campus/xbsf/2018CST/ 这个作业要求链接 https://www.cnblogs.com/nwnu-da ...

  5. YOLOV4知识点分析(一)

    YOLOV4知识点分析(一) 简 介 yolov4论文:YOLOv4: Optimal Speed and Accuracy of Object Detection arxiv:https://arx ...

  6. 毫米波RADAR与LIDAR探秘

    毫米波RADAR与LIDAR探秘 说起激光雷达和毫米波雷达,相信业内人士并不陌生,激光雷达是以发射激光束探测目标的位置.速度等特征量的雷达系统.而毫米波雷达是指工作在毫米波波段探测的雷达.毫米波实质上 ...

  7. CUDA 内存统一分析

    CUDA 内存统一分析 关于CUDA 编程的基本知识,如何编写一个简单的程序,在内存中分配两个可供 GPU 访问的数字数组,然后将它们加在 GPU 上. 本文介绍内存统一,这使得分配和访问系统中任何处 ...

  8. 短波红外(SWIR)相机camera

    短波红外(SWIR)相机camera AVs Can't Drive Everywhere. Can TriEye's SWIR Camera Help? TriEye的短波红外(SWIR)摄像机能否 ...

  9. Java 面试题关于包装类

    这几个问题的知识点涉及的内容非常的刁钻,值得自己好好的理解. 问以下程序的输出结果是: 问题一: Object object=true ? new Integer(1):new Double(2.0) ...

  10. 使用IDEA创建Maven项目

    一.创建一个普通的Maven项目 1.启动IDEA 2.创建一个Maven项目 3.Maven的目录结构 二.使用模板创建一个MavenWeb项目 1.启动IDEA 2.创建一个MavenWeb项目 ...