Skip to content

Commit e7c65f2

Browse files
committed
优化顶部加载动画
1 parent 8b66dab commit e7c65f2

File tree

9 files changed

+30
-8
lines changed

9 files changed

+30
-8
lines changed

Art_Blog.zip

90 Bytes
Binary file not shown.

dist/Art_Blog/common.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
&& (navigator.userAgent.indexOf('Opera') < 0)){
3535
window.location.href="echo esc_url(get_template_directory_uri()); /reminder.php";//判断IE5-10
3636
}*/
37-
if(navigator.appName == "Microsoft Internet Explorer"&&parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE",""))<9){
37+
if(navigator.appName == "Microsoft Internet Explorer"&&parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE",""))<9){
3838
window.location.href="<?php echo esc_url(get_template_directory_uri()); ?>/reminder";/*判断<IE9,此方法也可以判断<IE10*/
3939
}
4040
</script>

dist/Art_Blog/css/style_min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Art_Blog/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33

44
<head>
5-
<meta name='generator' content='WordPress/Art_Blog v2020-11-24 10:19:23'>
5+
<meta name='generator' content='WordPress/Art_Blog v2020-11-24 13:50:39'>
66
<title><?php $name = wp_title( '-', true, 'right' );
77
if ($name) {
88
echo $name . "&nbsp;-&nbsp;" . get_bloginfo('description');

dist/Art_Blog/js/main_min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/common.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
&& (navigator.userAgent.indexOf('Opera') < 0)){
3535
window.location.href="echo esc_url(get_template_directory_uri()); /reminder.php";//判断IE5-10
3636
}*/
37-
if(navigator.appName == "Microsoft Internet Explorer"&&parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE",""))<9){
37+
if(navigator.appName == "Microsoft Internet Explorer"&&parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE",""))<9){
3838
window.location.href="<?php echo esc_url(get_template_directory_uri()); ?>/reminder";/*判断<IE9,此方法也可以判断<IE10*/
3939
}
4040
</script>

src/css/style-pc.css

+22
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,33 @@
416416
-webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.08);
417417
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.08);
418418
}
419+
420+
@keyframes speed_bar_animation {
421+
0% {
422+
width: 0%;
423+
}
424+
425+
100% {
426+
width: 80%;
427+
}
428+
}
429+
@keyframes speed_bar_animation_complete {
430+
0% {
431+
width: 80%;
432+
}
433+
434+
100% {
435+
width: 100%;
436+
}
437+
}
438+
419439
header .speed_bar{
420440
width:0%;
421441
height:2px;
422442
background:url(../images/header_bj.gif);
423443
overflow: hidden;
444+
animation: speed_bar_animation 2s ease-in;
445+
animation-fill-mode: forwards;
424446
}
425447

426448
header.hover .header {

src/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33

44
<head>
5-
<meta name='generator' content='WordPress/Art_Blog v2020-11-24 10:19:23'>
5+
<meta name='generator' content='WordPress/Art_Blog v2020-11-24 13:50:39'>
66
<title><?php $name = wp_title( '-', true, 'right' );
77
if ($name) {
88
echo $name . "&nbsp;-&nbsp;" . get_bloginfo('description');

src/js/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -750,11 +750,11 @@
750750
// PC端执行函数
751751
pcFnAll: function () {
752752
// 顶部加载进度条
753-
$("header .speed_bar").css({'width':'80%','transition':'width 2s'})
754753
window.onload = function(){
755-
$("header .speed_bar").css({'width':'100%','transition':'width 0.5s'})
754+
$("header .speed_bar").css({'animation':'speed_bar_animation_complete .5s ease-out','animation-fill-mode':'forwards'})
756755
}
757756

757+
// 登录注册悬浮入口
758758
$(".login_alert_close").click(() => {
759759
$(".login_alert").slideUp();
760760
})

0 commit comments

Comments
 (0)