codepens/moving-mirror-web-audio-api.../dist/style.css

162 lines
2.6 KiB
CSS

:root {
--dolphin: rgb(184, 189, 189);
--pink: rgb(230, 146, 181);
--strongpink: rgb(255, 113, 193);
--black: rgb(0, 0, 0);
}
body {
margin: 0;
padding: 0;
overflow: hidden;
width: 100vw;
height: 100vh;
font-size: clamp(100%, 1rem + 2vw, 16px);
font-family: Arial;
background: radial-gradient(circle, var(--pink) 0%, var(--dolphin) 80%, var(--dolphin) 100%);
touch-action: pan-x;
}
#overlay-container {
position: absolute;
width: 100vw;
height: 100vh;
background: radial-gradient(circle, var(--pink) 0%, var(--dolphin) 80%, var(--dolphin) 100%);
opacity: 1.0;
}
#scene-container {
position: absolute;
background: radial-gradient(circle, var(--pink) 0%, rgb(140, 147, 147) 80%, rgb(121, 150, 150) 100%);
opacity: 0.0;
}
button {
position: absolute;
font-size: 1.2em;
background: rgba(255, 166, 210, 0.0);
margin: 0em;
padding: 0.25em 3.5em;
font-size: 1.1em;
font-weight: bold;
border: 1.25px solid var(--black);
border-radius: 50%;
color: var(--black);
cursor: pointer;
transition: 0.2s;
}
button:hover {
background: rgba(255, 166, 210, 0.75);
}
#btn-play {
margin: 0em;
font-size: 1.25em;
opacity: 1;
z-index: 5;
opacity: 0;
margin: 1.75em 1.75em;
padding: 1em;
transform: rotate(-20deg);
}
audio {
position: absolute;
bottom: 0;
left: 0;
opacity: 0.5;
transition: 0.2s;
}
audio:hover {
opacity: 1.0;
}
#credits {
position: absolute;
top: 0;
right: 0;
margin: 0;
padding: 0.75em 1em;
text-align: center;
color: var(--black);
opacity: 0;
font-size: 1.1em;
}
a {
color: var(--black);
text-decoration: none;
}
#credits a::before {
content: '';
display: inline-block;
position: relative;
transform-origin: center center;
top: -0.0325em;
height: 0.65em;
width: 0.65em;
background-color: var(--black);
color: var(--black);
border-radius: 100%;
margin-right: 0.35em;
}
#credits a:hover::before {
animation: 1.5s rotate ease-in-out infinite;
}
@keyframes rotate {
0% { transform: rotateY(0deg); }
100% { transform: rotateY(360deg); }
}
@keyframes fadeOut {
0% { opacity: 1.0;}
100% { opacity: 0;}
}
@keyframes fadeIn {
0% { opacity: 0.0;}
100% { opacity: 1;}
}
@keyframes fadeIn2 {
0% { opacity: 0.0;}
50% { opacity: 0.0;}
75% { opacity: 0.0;}
100% { opacity: 1;}
}
@keyframes fadeIn3 {
0% { opacity: 0.0;}
50% { opacity: 0.0;}
85% { opacity: 0.0;}
100% { opacity: 1;}
}
@media(max-width: 800px) {
audio {
position: absolute;
top: 0;
left: 0;
opacity: 0.0;
transition: 0.2s;
}
#credits {
opacity: 0;
}
}