new structure
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import "./style.css"
|
||||
export default function FallingSquares() {
|
||||
return (
|
||||
<div className="falling-container">
|
||||
{Array.from({ length: 10 }).map((_, i) => (
|
||||
<div key={i} className="square"></div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
//Chat
|
||||
//IO
|
||||
@@ -0,0 +1,117 @@
|
||||
.falling-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.square {
|
||||
position: absolute;
|
||||
top: -100px;
|
||||
opacity: 0.9;
|
||||
animation: fall linear infinite;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
@keyframes fall {
|
||||
0% {
|
||||
transform: translateY(0) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(110vh) rotate(1080deg);
|
||||
}
|
||||
}
|
||||
|
||||
.square:nth-child(1) {
|
||||
left: 10%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: linear-gradient(45deg, #ff7eb3, #ff758c);
|
||||
animation-duration: 4s;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
.square:nth-child(2) {
|
||||
left: 25%;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
background: linear-gradient(45deg, #43cea2, #185a9d);
|
||||
animation-duration: 6s;
|
||||
animation-delay: 2s;
|
||||
}
|
||||
.square:nth-child(3) {
|
||||
left: 40%;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: linear-gradient(45deg, #f7971e, #ffd200);
|
||||
animation-duration: 5s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
.square:nth-child(4) {
|
||||
left: 55%;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background: linear-gradient(45deg, #7f00ff, #e100ff);
|
||||
animation-duration: 7s;
|
||||
animation-delay: 3s;
|
||||
}
|
||||
.square:nth-child(5) {
|
||||
left: 70%;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
background: linear-gradient(45deg, #00c6ff, #0072ff);
|
||||
animation-duration: 4.5s;
|
||||
animation-delay: 1.5s;
|
||||
}
|
||||
.square:nth-child(6) {
|
||||
left: 85%;
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
background: linear-gradient(45deg, #f953c6, #b91d73);
|
||||
animation-duration: 6.5s;
|
||||
animation-delay: 2.5s;
|
||||
}
|
||||
.square:nth-child(7) {
|
||||
left: 15%;
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
background: linear-gradient(45deg, #11998e, #38ef7d);
|
||||
animation-duration: 5.5s;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
.square:nth-child(8) {
|
||||
left: 35%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: linear-gradient(45deg, #ff4e50, #f9d423);
|
||||
animation-duration: 7.5s;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
.square:nth-child(9) {
|
||||
left: 60%;
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
background: linear-gradient(45deg, #00b09b, #96c93d);
|
||||
animation-duration: 4.2s;
|
||||
animation-delay: 2.8s;
|
||||
}
|
||||
.square:nth-child(10) {
|
||||
left: 80%;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: linear-gradient(45deg, #ff9966, #ff5e62);
|
||||
animation-duration: 6.8s;
|
||||
animation-delay: 1.8s;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.square {
|
||||
animation: fall linear infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.square {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
.ocean {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 30vh;
|
||||
overflow: hidden;
|
||||
background: #4fc3f7; /* color del mar */
|
||||
z-index: -1; /* para que quede atrás del contenido */
|
||||
}
|
||||
|
||||
.wave {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 160%;
|
||||
height: 130%;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 50% 50%;
|
||||
animation: waveMove 6s linear infinite;
|
||||
}
|
||||
|
||||
.wave:nth-child(2) {
|
||||
top: -10;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
animation-duration: 8s;
|
||||
animation-delay: -2s;
|
||||
}
|
||||
|
||||
.wave:nth-child(3) {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
animation-duration: 10s;
|
||||
animation-delay: -4s;
|
||||
}
|
||||
|
||||
@keyframes waveMove {
|
||||
0% {
|
||||
transform: translateX(0) translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-25%) translateY(5%);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0) translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.ocean {
|
||||
background: transparent;
|
||||
}
|
||||
.wave {
|
||||
display: none;
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
'use client';
|
||||
import styles from './wave.module.css';
|
||||
|
||||
export default function WavesBackground() {
|
||||
return (
|
||||
<div className={styles.ocean}>
|
||||
<div className={styles.wave}></div>
|
||||
<div className={styles.wave}></div>
|
||||
<div className={styles.wave}></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
//Chat
|
||||
//IO
|
||||
Reference in New Issue
Block a user