페이지 로딩 구현
js
css
html
- $(document).ready(function(){
- $('body').prepend('<div class="loader"></div>');
- $('body').append('<div class="overlay"></div>');
- $("div.loader").fadeOut(300);
- $("div.overlay").fadeOut(300);
- $("div.container").show();
- });
css
- .loader{
- position:fixed;
- left:50%;
- top:50%;
- z-index:1;
- width:150px;
- height:150px;
- margin:-75px 0 0 -75px;
- border:16px solid #fff;
- border-radius:50%;
- border-top:16px solid #3498db;
- width:120px;
- height:120px;
- -webkit-animation:spin 2s linear infinite;
- animation:spin 2s linear infinite;
- z-index:105
- }
- @-webkit-keyframes spin{
- 0%{-webkit-transform:rotate(0deg)}
- 100%{-webkit-transform:rotate(360deg)}
- }
- @keyframes spin{
- 0%{transform:rotate(0deg)}
- 100%{transform:rotate(360deg)}
- }
- .overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.35);z-index:100}
html
페이지 로딩 구현
Reviewed by jieun
on
오전 2:04
Rating:
댓글 없음: