This article mainly describes the CSS making prompt box ' loading please .... ' Method, has a certain reference value, now share to everyone, the need for friends can refer to
Recently do the project encountered such a demand, page load data is slow, has not responded, the following small series to everyone brought to you based on the CSS Production prompt box ' is loading please .... ' function, need a friend to refer to it
Demand:
Sometimes the load data is slow, the page has not responded, the user may be constantly brushing, and the user experience is not good
Solve:
Add the following code to JS
Hint Information function addrunningp () { $ ("<p class=\" Datagrid-mask\ "></p>"). CSS ({display: "Block", Width: "100%", Height: $ (document). Height ()}). AppendTo ("body"); $ ("<p class=\" datagrid-mask-msg\ "></p>"). HTML ("Processing, please wait patiently ..."). AppendTo ("Body"). CSS ({display: "Block ", Left: ($ (document.body). Outerwidth (True)-2, Top: ($ (document). Height ()-2}); } Suppress the message function Moverunningp () { $ ("p[class= ' Datagrid-mask ')"). Remove (); $ ("p[class= ' datagrid-mask-msg ']"). Remove ();
Can be called where needed.
The effect is as follows: The entire page is not editable
The above is the whole content of this article, I hope that everyone's learning has helped, more relevant content please pay attention to topic.alibabacloud.com!