Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Kicamon committed Sep 25, 2024
1 parent 6091c68 commit b646ffd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
32 changes: 20 additions & 12 deletions css/card.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,22 @@
height: 20vmin;
justify-content: center;
align-items: center;
animation: HeaBeat 2s linear infinite;
}

.card>.heart>.ani {
position: absolute;
width: 4vmin;
height: 4vmin;
background-color: red;
animation: HeaBeat 1s linear infinite;
}

.card>.heart>.ani:nth-of-type(2) {
position: absolute;
width: 4vmin;
height: 4vmin;
background-color: red;
transform: rotate(45deg);
animation: HeaBeat2 1s linear infinite;
}

.card>.heart>.ani::before {
Expand All @@ -86,23 +94,23 @@

@keyframes HeaBeat {
0% {
transform: scale(1);
}

25% {
transform: scale(1.25);
transform: scale(1) rotate(45deg);
}

50% {
transform: scale(1.5);
100% {
transform: scale(1.5) rotate(45deg);
}
}

75% {
transform: scale(1.25);
@keyframes HeaBeat2 {
0% {
transform: scale(1) rotate(45deg);
opacity: 1;
}

100% {
transform: scale(1);
transform: scale(2.3) rotate(45deg);
opacity: 0;
}
}

Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</div>
<div class="heart">
<div class="ani"></div>
<div class="ani"></div>
</div>
<div class="head-img">
<div class="img-y"></div>
Expand All @@ -48,8 +49,9 @@
<div class="page">
<div class="time">
<div class="title">
2024.04.05 ~ 2024.08.18
这是我们一起走过的
</div>
<div id="time"></div>
</div>
<div class="jump">
<a href="./pages/clover.html">情书</a>
Expand Down
2 changes: 1 addition & 1 deletion pages/story.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h3 class="subtitle">我们的故事</h3>
<div class="timeline"></div>

<div class="bottom">
<h2 class="endtitle">故事就此结束</h2>
<h2 class="endtitle">我们的故事,未完待续……</h2>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions scripts/time.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
window.addEventListener("load", () => {
function calculate_time_from_now() {
let time_now = new Date('August 18, 2024 23:31:00');
let time_now = new Date();
let date_targer = new Date('April 5, 2024 22:00:00');
let time_diff = time_now.getTime() - date_targer.getTime();
let days = Math.floor(time_diff / (1000 * 60 * 60 * 24));
let hours = Math.floor(time_diff % (1000 * 60 * 60 * 24) / (1000 * 60 * 60));
let minutes = Math.floor(time_diff % (1000 * 60 * 60) / (1000 * 60));
let seconds = Math.floor(time_diff % (1000 * 60) / 1000);
time.innerText = days + "天" + hours + "时" + minutes + "分";
time.innerText = days + "天" + hours + "时" + minutes + "分" + seconds + "秒";
}

calculate_time_from_now();
Expand Down

0 comments on commit b646ffd

Please sign in to comment.