jquery css3页面弹出loading加载

在前段页面制作中,一个选项卡往往需要加载的内容会很多,例如一些图片站和特效站点,过长的加载和不完整的加载会给读者很不好的体验,这时候,如果我们在加载的过程中加入一个小小的设定,就是接下来要给大家展现的,loading等待加载提示,大家可以自由发挥把加载美化城进度条也,用户体验会更好一些。

不多罗嗦大家看效果吧

jquery css3页面弹出loading加载

完成源码:(ps:js文件真心贴不出来,小编也很苦恼,需要还是留邮箱吧,小编保证,只是发源码,绝不广告骚扰)

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>jquery css3页面弹出loading加载</title>

</head>

<body>

<style type="text/css">

/* reset */

*{margin:0;padding:0;list-style-type:none;}

a{blr:expression(this.onFocus=this.blur())}/*去掉a标签的虚线框,避免出现奇怪的选中区域*/

:focus{outline:0;}

label{cursor:pointer;}

img{vertical-align:middle;}

table{empty-cells:show;border-collapse:collapse;border-spacing:0;}

h1{font-size:16px;}h2,h3,h4{font-size:14px;}h5,h6{font-size:12px;}

abbr,acronym{border:0;font-variant:normal}

address,caption,cite,code,dfn,em,th,var,optgroup{font-style:normal;font-weight:normal}

input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit}

input,button,textarea,select{*font-size:100%}

a,img{border:0;}

a,a:visited{color:#5e5e5e; text-decoration:none;}

a:hover{color:#4183C4;text-decoration:underline;}

.clear{display:block;overflow:hidden;clear:both;height:0;line-height:0;font-size:0;}

.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}

.clearfix{display:inline-table;}/* Hides from IE-mac \*/

*html .clearfix{height:1%;}

.clearfix{display:block;}/* End hide from IE-mac */

*+html .clearfix{min-height:1%;}

body{font:12px/180% Arial,Lucida,Verdana,"宋体",Helvetica,sans-serif;color:#333;background:#fff;}

/* shortcut */

.shortcut{height:32px;line-height:32px;font-size:12px;background:#eee;text-transform:uppercase;box-shadow:1px 0px 2px rgba(0,0,0,0.2);border-bottom:1px solid #DDDDDD;}

.shortcut h1{font-size:14px;font-family:"微软雅黑","宋体";}

.shortcut a,.shortcut h1{padding:0px 10px;letter-spacing:1px;color:#333;text-shadow:0px 1px 1px #fff;display:block;float:left;width:360px;height:32px;overflow:hidden;}

.shortcut a:hover{background:#fff;}

.shortcut span.right{float:right;display:inline-block;width:468px;height:15px;overflow:hidden;margin:8px 5px 0 0;}

.shortcut .close{

background:url(/Public/images/close-demo.gif) no-repeat 0 0;width:20px;height:20px;line-height:99em;overflow:hidden;display:inline-block;margin:6px 10px 0 10px;float:right;padding:0;

-webkit-transition:all .3s ease-out 0s;

-moz-transition:all .3s ease-out 0s;

-ms-transition:all .3s ease-out 0s;

-o-transition:all .3s ease-out 0s;

transition:all .3s ease-out 0s;

}

.shortcut .close:hover{background:url(/Public/images/close-demo.gif) no-repeat 0 -20px}

.shortcut .close:active{background:url(/Public/images/close-demo.gif) no-repeat 0 -40px}

</style>

<script type="text/javascript" src="./jquery css3页面弹出loading加载代码_files/jquery-1.4.2.min.js"></script>

<script type="text/javascript">

$(document).ready(function(){

var iframeHeight = function () {

var _height = $(window).height() - 34;

$('#content').height(_height);

}

window.onresize = iframeHeight;

$(function () {

iframeHeight();

});

});

</script>

<div id="container" style="overflow:hidden;">

<iframe border="0" id="content" src="./jquery css3页面弹出loading加载代码_files/index.html" frameborder="0" height="100%" width="100%" style="height: 577px;"></iframe>

</div>

<script type="text/javascript">

var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");

document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F382f81c966395258f239157654081890' type='text/javascript'%3E%3C/script%3E"));

</script>

<script src="./jquery css3页面弹出loading加载代码_files/h.js" type="text/javascript"></script>

</body>

</html>

相关推荐