So So 한 Tistory

[펌] 자바스크립트 페이지넘길때 대기메세지 본문

[ 소스 ]/- 그누보드5

[펌] 자바스크립트 페이지넘길때 대기메세지

황금이 아빠 2018. 7. 11. 15:53

[펌] 자바스크립트 페이지넘길때 대기메세지

장점 : 잘된다.

단점 : 외부소스링크 됬을대 시간이 지연된다.(속도저하)


<style type="text/css">

        .loading {display:none; position:absolute; top:-4px; left:0; z-index:99; width:100%; height:100%; background:rgba(0, 0, 0, 0.5);}

        .loading strong {display:block; position:relative; top:50%; margin:-75px auto 0 auto; width:320px; height:100px; padding:0 30px;


        border-radius: 10px;

        -webkit-border-radius: 10px;

        -moz-border-radius: 10px;

box-sizing:border-box;

        background:#fff;

        color:#000; font-size:16px; line-height:50px; text-align:center;

        }

 </style>

<body> 

<div>

<h1>&nbsp;</h1>

<iframe src="주소" width="1" height="1px"></iframe>

</div>

<div class="loading">

<strong>하꼼만 이십서.......<br> [잠시만 기다려주세요]</strong>

</div>

<script type="text/javascript">

$(document).ready(function() {

    $('.loading').show();

});  

$(window).on('load', function() {

    $('.loading').hide();

});

</script>

</body> 

</html> 

Comments