123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <template>
- <div class="fireflies-box">
- <div class="fireflies">
- <div class="firefly fly1"></div>
- <div class="firefly fly2"></div>
- <div class="firefly fly3"></div>
- <div class="firefly fly4"></div>
- <div class="firefly fly5"></div>
- <div class="firefly fly6"></div>
- </div>
- </div>
- </template>
-
- <script>
- export default {
- name: 'FireFlies'
- }
- </script>
-
- <style lang="less" scoped>
- .fireflies-box {
- width: 100%;
- height: 100%;
- background: transparent;
-
- position: absolute;
- top: 0;
- left: 0;
-
- .fireflies {
- position: relative;
- width: 100%;
- height: 100%;
- .firefly {
- position:absolute;
- top:50%;
- left:50%;
- width: 0.3em;
- height: 0.3em;
- background-color:rgb(244,219,98);
- border-radius:50%;
- box-shadow:0 0 1.4em rgb(244,219,98);
- opacity: 0;
- }
-
- @tm-dur: 3s;
- @tm-dly: .3s;
-
- .fly1 {
- animation-delay: @tm-dly;
- animation-name: shake, flight1;
- animation-duration: @tm-dur - .6;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
- }
- .fly2 {
- animation-delay: @tm-dly;
- animation-name: shake, flight2;
- animation-duration: @tm-dur + .5;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
- }
- .fly3 {
- animation-delay: @tm-dly;
- animation-name: shake, flight3;
- animation-duration: @tm-dur + .8;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
- }
- .fly4 {
- animation-delay: @tm-dly;
- animation-name: shake, flight4;
- animation-duration: @tm-dur + .5;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
- }
- .fly5 {
- animation-delay: @tm-dly;
- animation-name: shake, flight5;
- animation-duration: @tm-dur + .2;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
- }
- .fly6 {
- animation-delay: @tm-dly;
- animation-name: shake, flight6;
- animation-duration: @tm-dur - .3;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
- }
- }
-
- @keyframes shake {
- 0% {
- opacity: 0.1;
- }
- 85% {
- opacity: 1;
- width: 0.6em;
- height: 0.6em;
- }
- 100% {
- opacity: 0;
- }
- }
-
- @keyframes flight1 {
- 0% {
- top: 50%;
- left: 50%;
- }
- 60% {
- top: 35%;
- left: 16%;
- }
- 100% {
- top:15%;
- left:5%;
- }
- }
- @keyframes flight2 {
- 0% {
- top: 50%;
- left: 50%;
- }
- 60% {
- top: 45%;
- left: 15%;
- }
- 100% {
- top: 55%;
- left:3%;
- }
- }
- @keyframes flight3 {
- 0% {
- top: 50%;
- left: 50%;
- }
- 50% {
- top: 65%;
- left: 25%;
- }
- 100% {
- top: 85%;
- left:8%;
- }
- }
- @keyframes flight4 {
- 0% {
- top: 50%;
- left: 50%;
- }
- 60% {
- top: 35%;
- left: 76%;
- }
- 100% {
- top: 15%;
- left: 95%;
- }
- }
- @keyframes flight5 {
- 0% {
- top: 50%;
- left: 50%;
- }
- 60% {
- top: 52%;
- left: 80%;
- }
- 100% {
- top: 55%;
- left: 95%;
- }
- }
- @keyframes flight6 {
- 0% {
- top: 50%;
- left: 50%;
- }
- 50% {
- top: 65%;
- left: 75%;
- }
- 100% {
- top: 85%;
- left: 88%;
- }
- }
- }
- </style>
|