html5自定义遮罩的实现代码分享

黄舟
풀어 주다: 2017-03-31 13:30:09
원래의
2196명이 탐색했습니다.

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

(function($){ var container = null; var html = "
"; 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);
로그인 후 복사

1343.jpg

위 내용은 html5自定义遮罩的实现代码分享의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!