Skip to content

Commit

Permalink
优化动画效果
Browse files Browse the repository at this point in the history
  • Loading branch information
penghaifeng committed Apr 3, 2019
1 parent fcb675b commit 702f766
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
17 changes: 14 additions & 3 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ body {
position: absolute;
left: -40%;
top: 0;
width: 10%;
width: 20%;
max-width: 8rem;
height: 100%;
background-image: -moz-linear-gradient(0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
background-image: -webkit-linear-gradient(0deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
background-image: -moz-linear-gradient(0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
background-image: -webkit-linear-gradient(0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
z-index: 999;
}

Expand All @@ -44,6 +45,16 @@ body {
-moz-transition-delay: 0.5s;
-o-transition-delay: 0.5s;
-webkit-transition-delay: 0.5s;
animation: fadin-and-out 0.8s;
animation-delay: 0.5s;
animation-fill-mode: forwards;
}

@keyframes fadin-and-out {
0% {opacity: 0}
10% {opacity: 90}
70% {opacity: 100}
100% {opacity: 0}
}

.progress-ctn .title {
Expand Down
1 change: 0 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<div class="past">
<div class="light"></div>
</div>

<div class="title">
<span class="clear-text" contenteditable="true"></span>
</div>
Expand Down

0 comments on commit 702f766

Please sign in to comment.