You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
2.6 KiB

@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600&display=swap');
:root {
--border-color: #144fc6;
--fill-color: #6ab3f8;
}
* {
box-sizing: border-box;
}
body {
background-color: #3494e4;
color: #fff;
font-family: 'Montserrat', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40px;
}
h1 {
margin: 10px 0 0;
}
h3 {
font-weight: 400;
margin: 10px 0;
}
.cup {
background-color: #fff;
border: 4px solid var(--border-color);
color: var(--border-color);
border-radius: 0 0 40px 40px;
height: 330px;
width: 150px;
margin: 30px 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.cup.cup-small {
height: 95px;
width: 50px;
border-radius: 0 0 15px 15px;
background-color: rgba(255, 255, 255, 0.9);
cursor: pointer;
font-size: 14px;
align-items: center;
justify-content: center;
text-align: center;
margin: 5px;
transition: 0.3s ease;
}
.cup.cup-small.full {
background-color: var(--fill-color);
color: #fff;
}
.cups {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
width: 280px;
}
.remained {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
flex: 1;
transition: 0.3s ease;
}
.remained span {
font-size: 20px;
font-weight: bold;
}
.remained small {
font-size: 12px;
}
.percentage {
background-color: var(--fill-color);
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 30px;
height: 0;
position: relative;
transition: 0.3s ease;
}
.percentage::after {
content: '';
height: 10px;
width: 40px;
position: absolute;
top: 0;
left: 0;
transform: translateY(-30%) translateX(-30%);
border-top-right-radius: 30px;
border-top-left-radius: 20px;
background-color: #6ab3f8;
animation: water 5s linear infinite;
}
.percentage::before {
content: '';
height: 10px;
width: 40px;
position: absolute;
top: 0;
left: 0;
transform: translateY(-30%) translateX(90%);
border-top-right-radius: 30px;
border-top-left-radius: 20px;
background-color: #6ab3f8;
animation: water-s 5s linear infinite;
}
@keyframes water-s {
0% {
transform: translateX(90%) translateY(-30%);
}
100% {
opacity: 1;
transform: translateX(-100%) translateY(-30%);
}
}
@keyframes water {
0% {
transform: translateX(-30%) translateY(-30%);
}
100% {
opacity: 1;
transform: translateX(330%) translateY(-30%);
}
}
.text {
text-align: center;
margin: 0 0 5px;
}