Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

¡commit final! #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@
<title>Feliz Cumpleaños :)</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" href="icono.png">
</head>
<body id="todo">
<audio id="sonidito">
<source src="sonidito.mp3">
</audio>
<div id="caja">
<img id="tapa" class="tapa" src="tapa.png" alt="Caja de Regalo">
<div id="container" class="">
<h1 id="mensaje" class="">Feliz Cumpleaños :D</h1>
<img id="mandarina" class="" src="mandarina.png" alt="Naranja">
</head>
<body>
<div class="preloader">
<div class="carga">
<div class="carga">
<div class="carga"></div>
</div>
</div>
</div>
<div id="todo">
<audio id="sonidito">
<source src="sonidito.mp3">
</audio>
<div id="caja">
<img id="tapa" class="tapa" src="tapa.png" alt="Caja de Regalo">
<div id="container" class="">
<h1 id="mensaje" class="">Feliz Cumpleaños :D</h1>
<img id="mandarina" class="" src="mandarina.png" alt="Naranja">
</div>
<img id="regalo" class="regalo" src="regalo.png" alt="Caja de Regalo">
</div>
<img id="regalo" class="regalo" src="regalo.png" alt="Caja de Regalo">
</div>
<!-- <div id="mensaje" class="oculto">
<h1>Feliz Cumpleaños :D</h1>
<img class="mandarina" src="mandarina.png" alt="Naranja">
</div> -->
<script src="script.js"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,16 @@ todo.addEventListener("click", function() {
//sonido
document.getElementById("todo").addEventListener("click", function() {
document.getElementById("sonidito").play();
});

//carga
const preloader = document.querySelector(".preloader");

window.addEventListener("load", () => {
preloader.classList.add("fadeOut");
});


window.addEventListener("load", () => {
preloader.classList.add("fadeOut");
});
49 changes: 49 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,53 @@ body {

.oculto {
display: none;
}

.preloader{
width: 100%;
height: 100%;
background-color: #000000;
position: fixed;
left: 0;
top: 0;
z-index: 1000;

opacity: 1;
transition: opacity 0.5s ease-in-out;
}

.preloader.fadeOut {
opacity: 0;
display: none;
}


.carga{
width: 70px;
height: 70px;
border-top: 5px solid #a30e0e;
border-right: 5px solid transparent;
border-radius: 50%;
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
margin: auto;
z-index: 2001;

animation: carga 1s linear infinite;
}

.carga > div{
box-sizing: border-box;
margin: auto;
width: 100%;
height: 100%;

animation: carga 1s linear infinite;
}

@keyframes carga {
to{transform: rotate(360deg);}
}