Commit 1fe3e13b by 李伟康

commit 修改动画速度

1 parent 0e77af3e
<template>
<div class="main" ref="main">
<div
class="main"
ref="main"
>
</div>
</template>
......@@ -23,7 +26,9 @@ export default {
if (Date.now() - stamp >= delay) {
fn(); stamp = Date.now();
}
requestAnimationFrame(_loop);
setTimeout(function () {
requestAnimationFrame(_loop);
}, 1e3 / 15)
}
requestAnimationFrame(_loop);
}
......@@ -96,8 +101,7 @@ export default {
trail.move();
trail.traverse((c, i, last) => {
c.element.style = `
color: hsl(182, 92%, ${85 / len * (i + 1)}%)
`;
color: hsl(182, 92%, ${85 / len * (i + 2)}%)`;
if (last) {
c.mutate();
c.element.style = `
......@@ -132,13 +136,13 @@ export default {
display: flex;
transform: rotate(180deg);
animation: show-rain 1s 3s forwards;
opacity: 0;
opacity: 0;
/deep/.rain-item {
line-height: 1;
}
/deep/.character {
display: block;
width: 6vmax;
width: 5vmax;
height: 2vmax;
font-size: 1vmax;
color: #6df5f9;
......@@ -146,9 +150,9 @@ export default {
transform: rotate(180deg);
}
}
@keyframes show-rain {
100%{
opacity: .5;
@keyframes show-rain {
100% {
opacity: 0.35;
}
}
</style>
\ No newline at end of file
......@@ -7,9 +7,11 @@
-->
<template>
<div class="layout">
<left-model />
<center-model />
<right-model />
<div class="layout-box">
<left-model />
<center-model />
<right-model />
</div>
<character-rain />
</div>
</template>
......@@ -42,10 +44,14 @@ export default {
background: url('../../assets/images/factor/factor-bg.png') no-repeat center;
background-size: contain;
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 80px;
&-box {
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 80px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!