day - 00 month - 0000

Stele care cad

<style>

* {

  margin: 0;

  padding: 0;

  box-sizing: border-box;

}


body {

  background: #111;

  min-height: 100vh;

  overflow: hidden;

}


.star {

  position: absolute;

  top: -20px;

  color: #999999;

  animation: animate 5s linear forwards;

  /* you can set infinite too */

}


.star::before {

  content: "\f005";

  font-family: FontAwesome;

  text-shadow: 0 0 5px #000, 0 0 20px #000, 0 0 50px #000;

}


@keyframes animate {

  0% {

    transform: translateY(0) rotate(0deg);

    opacity: 1;

  }


  80% {

    opacity: 1;

  }


  100% {

    transform: translateY(100vh) rotate(360deg);

    opacity: 0;

  }

}


@media screen and (max-width: 600px) {

  .star {

    font-size: 8px;

  }

}

</style>

<script>

/* Script by petre-vitan */

function stars() {

  let e = document.createElement("div");

  e.setAttribute("class", "star");

  document.body.appendChild(e);

  e.style.left = Math.random() * +innerWidth + "px";


  let size = Math.random() * 12;

  let duration = Math.random() * 3;


  e.style.fontSize = 12 + "px";

  e.style.animationDuration = 2 + duration + "s";

  setTimeout(function () {

    document.body.removeChild(e);

  }, 5000);

}


setInterval(function () {

  stars();

}, 50);

</script>


Niciun comentariu:

Trimiteți un comentariu

Lasa un comentariu

Bine ai venit!

Articole aleatorii

Formular de contact

Nume

E-mail *

Mesaj *

Arhivă blog

Bine de stiut

Cand iti este dor de cineva sa nu inchizii ochii. Are sa-ti fie si mai dor!

💛🧡❤️💜💙💚💛🧡❤️💜💙💚💛🧡❤️💜 💙💚💛🧡❤️💜💙💚💛🧡❤️💜💙💚
Iti promit ca intr- zi cand o sa fim batrani, o sa te tin de mana si apoi uitandu-ma in ochii tai am sa-ti spun: "Ai vazut ca am avut dreptate? Am imbatranit alaturi de tine! "

Comentarii recente

Social

DODO

De unde avem vizite?

Flag Counter
Intr-un ochi de apa patru ochi luceste
Ce sa fie oare? Este doua peste!
(fara poezie viata e pustiu)
Sper sa-ti placa de mine macar un pic
mai ales la cat m-am chinuit sa fac asta.



💖 Copyright © 2018 - Blogul lui Petre Vitan
💖 Powered by Blogger ⋆⭒˚。⋆ Design by Petre Vitan ⋆⭒˚。⋆