<div class="container">
<div class="logo"></div>
<div class="shadow"/></div>
</div>
:root {
--drop-height: 200px;
--logo-size: 48px;
--offset: 50px;
--shadow-height: 8px;
}
html, body {
height: 100%;
width: 100%;
margin: 0;
}
.container {
width: 100%;
height: 100%;
background-color: lightgray;
position: relative;
}
.logo {
width: var(--logo-size);
height: var(--logo-size);
border-radius: 100%;
background-color: salmon;
position: absolute;
top: var(--offset);
left: calc(50% - var(--logo-size)/2);
}
.shadow {
width: var(--logo-size);
height: var(--shadow-height);
background-color: teal;
position: absolute;
top: calc(var(--offset) + var(--drop-height) + var(--logo-size) - var(--shadow-height) / 2 );
left: calc(50% - var(--logo-size)/2);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.