bootstrap有个模态框(modal.js),使用它我们可以做出loading效果。
- 效果图:
方法一(全部js实现):
function
initLoading(){
$(
"body"
).append(
"<!-- loading -->"
+
"<div class='modal fade' id='loading' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' data-backdrop='static'>"
+
"<div class='modal-dialog' role='document'>"
+
"<div class='modal-content'>"
+
"<div class='modal-header'>"
+
"<h4 class='modal-title' id='myModalLabel'>提示</h4>"
+
"</div>"
+
|