Merge branch 'master' of github.com:ant-design/ant-design

This commit is contained in:
afc163 2015-06-09 14:47:00 +08:00
commit 1727066af3
3 changed files with 30 additions and 32 deletions

View File

@ -269,6 +269,6 @@ $(function () {
}
}
};
bannerAnim.init()
//bannerAnim.init()
window.bannerAnim=bannerAnim;
});

View File

@ -60,43 +60,41 @@ $(function () {
self.load()
},
load:function (){
var self=this,lArr=[],num= 0,tNum=0;
function getJS(){
for(var i=0;i<lArr.length;i++){
var str=lArr[i];
if(tNum>=lArr.length){
self.loadBox.addClass("load-out").one(animEndStr, function () {
self.loadBox.remove();
$("<script src=" + str + "></script>").appendTo($("body"));
});
}else{
$("<script src=" + str + "></script>").appendTo($("body"));
}
tNum++;
self.loadBar.css("width",tNum/loadData.length*100+"%");
}
var self=this,num= 0;
function endLoad(){
self.loadBox.addClass("load-out").one(animEndStr, function () {
self.loadBox.remove();
bannerAnim.init();
});
}
for(var i=0;i<loadData.length;i++){
var str=loadData[i];
if (str.indexOf(".js") >= 0) {
lArr.push(str);
num++;
if (num >= loadData.length) {
setTimeout(getJS,500);
}
function getLoad(){
var str=loadData[num];
if(str.indexOf(".js")>=0){
$.getScript(str,function (){
num++;
self.loadBar.css("width",num/loadData.length*100+"%");
if(num>=loadData.length){
setTimeout(endLoad,300);
}else{
getLoad();
}
})
}else{
var img = new Image();
img.onload = img.onerror = function () {
num++;
tNum++;
self.loadBar.css("width",tNum/loadData.length*100+"%");
self.loadBar.css("width",num/loadData.length*100+"%");
if (num >= loadData.length) {
setTimeout(getJS,500);
setTimeout(endLoad,300);
}else{
getLoad();
}
};
img.src = str;
}
}
getLoad();
}
};
$().ready(function (){

View File

@ -375,8 +375,8 @@ header {
-webkit-transition: width .3s cubic-bezier(0.785, 0.135, 0.15, 0.86);;
}
.load-out {
-webkit-animation: alphaOut 1s cubic-bezier(0.6, -0.28, 0.735, 0.045);
animation: alphaOut 1s cubic-bezier(0.6, -0.28, 0.735, 0.045);
-webkit-animation: alphaOut .5s cubic-bezier(0.6, -0.28, 0.735, 0.045);
animation: alphaOut .5s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}
.banner-box #bannerAnim .banner-line-absolute {
@ -1584,8 +1584,8 @@ footer ul li > a {
}
.index-page footer {
-webkit-animation: yBottomMatrix .5s ease-out 2s backwards;
animation: yBottomMatrix .5s ease-out 2s backwards;
-webkit-animation: yBottomMatrix .5s ease-out 1s backwards;
animation: yBottomMatrix .5s ease-out 1s backwards;
}
.index-page .logo {