<html>
<head>
<title>coffee mug</title>
</head>
<body>
<div id=cofee-mug>
<div id= coffee> </div>
<div id ="ear">
<div id = "inner-ear"> </div>
</div>
<div id="steam"></div>
<div id="steam2"></div>
</div>
</body>
</html>
body{
background-color:#448085;
display:flex;
justify-content: center;
position:relative;
}
#cofee-mug{
width:290px;
height: 200px;
background-color:#D29DAA;
position: absolute;
top: 111px;
display: flex;
justify-content: center;
border-radius: 3px 11px 94px 100px / 25px 1px 165px 170px;
}
#coffee{
width: 210px;
height:70px;
position:absolute;
bottom: 18px;
background-color: #850D0D;
animation-name: fillCup;
animation-duration: 3s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
border-radius: 3px 11px 94px 100px / 25px 1px 165px 170px;
}
#ear{
width:100px;
height:115px;
border-radius: 50%;
background-color: #D29DAA;
position: absolute;
left:266px;
top:29px;
}
#inner-ear{
position:absolute;
width:67px;
height:77px;
border-radius: 50%;
top:20px;
left:17px;
background-color: #448085;
}
#steam{
background-color:#d3d3d3;
width:25px;
height:25px;
filter: blur(8px);
-webkit-filter: blur(8px);
border-radius: 50%;
position: absolute;
top: -25px;
left:131px;
visibility:hidden;
animation: steamfill;
animation-duration: 4s;
animation-delay: 2s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
#steam2{
background-color:#d3d3d3;
width:20px;
height:20px;
filter: blur(12px);
-webkit-filter: blur(12px);
border-radius: 50%;
position: absolute;
top: -19px;
left:141px;
visibility:hidden;
animation: steamfill2;
animation-duration: 4s;
animation-delay: 3s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
@keyframes fillCup {
from{height: 70px;}
to{height:160px;}
}
@keyframes steamfill {
0%{visibility:hidden;}
80%{visibility: visible;
top:-140px;
background-color: #448085;
transform: translate(-20px);
}
100%{visibility:hidden;
background-color: #448085;
}
}
@keyframes steamfill2 {
0%{visibility:hidden;}
80%{visibility: visible;
top:-100px;
background-color: #448085;
transform: translate(40px);
}
100%{visibility:hidden;
background-color: #448085;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.