html5自定义遮罩的实现代码分享
ys_loading.css
.ys-loading{
position:fixed;
top:0;
bottom:0;
left:0;
right:0;
z-index: 9999;
}
.ys-loading em{
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
width:44px;
height:44px;
margin:auto;
border-radius: 22px;
opacity: 0.3;
overflow: hidden;
}
.ys-loading em:before{
content:"";
display:block;
width:46px;
height:46px;
background:url(../../images/common/ajax-loader.gif) no-repeat center center;
background-size:contain;
margin-top:-1px;
margin-left:-1px;
}ys_loading.js
使用模板与程序分离的方式构建,依靠专门设计的数据库操作类实现数据库存取,具有专有错误处理模块,通过 Email 实时报告数据库错误,除具有满足购物需要的全部功能外,成新商城购物系统还对购物系统体系做了丰富的扩展,全新设计的搜索功能,自定义成新商城购物系统代码功能代码已经全面优化,杜绝SQL注入漏洞前台测试用户名:admin密码:admin888后台管理员名:admin密码:admin888
(function($){
var container = null;
var html = "<div class='ys-loading'><em></em></div>";
function render(){
container = $(html).appendTo("body");
}
var initialized = false;
function init(){
if(initialized){
return;
}
initialized = true;
render();
}
var LoadingWidget = {
showLoading:function(){
init();
container.show();
},
hideLoading:function(){
container.hide();
}
};
window.LoadingWidget = LoadingWidget;
})(jQuery);










