<div class="plants">
<div class="plant ">
<div class="leaves plant-1">
</div>
</div>
<div class="plant plant-2">
<div class="leaves plant-2">
</div>
</div>
<div class="plant">
<div class="leaves plant-3">
</div>
</div>
<div class="plant plant-2">
<div class="leaves plant-4">
</div>
</div>
$background: #dbf4d4;
$dark-green: #4e7816;
$light-green: #568515;
$lighter-green: #77aa2f;
$pot-brown: #b86112;
$light-brown: #bf6a45;
$brown-shadow: #c06b46;
$wall-shadow: #c4dbbe;
$spike: #ebf9d6;
$spike-faded: #fdfefa;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*:before,
*:after {
content: "";
position: absolute;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
html,
body {
height: 100%;
width: 100%;
background: $background;
}
.plants {
height: 80vh;
width: 80em;
max-width: 80%;
position: absolute;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
display: flex;
flex-direction: row;
@media only screen and (max-width: 48em) {
flex-wrap: wrap;
height: 100%;
}
}
.plant {
position: relative;
width: 25%;
height: 50%;
display: flex;
flex-direction: column;
align-items: center;
//pots
&:before {
width: 6.25em;
height: 3.75em;
top: calc(52vh - 3.75em);
background: $pot-brown;
border-radius: 0 0 40px 40px;
background-image: linear-gradient(
to bottom,
transparent 1em,
#a6580d 1em,
#a6580d 1.5em,
transparent 1.5em
);
box-shadow: 0.8em 0 $wall-shadow, 0 -0.1em $brown-shadow;
z-index: 100;
}
//shelf
&:after {
width: 100%;
height: 0.75em;
top: 52vh;
background: $light-brown;
box-shadow: $brown-shadow 0 0.75em 0px -0.4em, $wall-shadow 0 0.5em 0 0,
$wall-shadow 0 1.25em 0 0;
}
@media only screen and (max-width: 48em) {
width: 50%;
&:after {
bottom: 4em;
}
}
}
.leaves {
position: absolute;
background: $light-green;
box-shadow: 0.8em 0 $wall-shadow;
&.plant-1 {
width: 2.4em;
height: 8.8em;
top: calc(52vh - 3.75em - 8.8em);
border-radius: 4em 4em 0 0;
background-image: repeating-linear-gradient(
to right,
$dark-green,
$dark-green 0.3em,
transparent 0.3em,
transparent 0.6em
);
&:before {
width: 2em;
height: 5.6em;
top: 1.6em;
left: -2.8em;
background: inherit;
border-radius: 4em 4em 0 4em;
z-index: -1;
background-image: inherit;
box-shadow: inherit;
}
&:after {
width: 1em;
height: 2em;
top: 5.2em;
left: -1em;
background: inherit;
z-index: -1;
}
}
&.plant-2 {
width: 5.6em;
height: 5.6em;
top: calc(52vh - 3.75em - 4.8em);
border-radius: 50%;
background-size: 1.2em 1.2em, 1.2em 1.2em, 5.6em 5.6em;
background-image: radial-gradient(
1em 4.8em at center,
$spike 3%,
transparent 3%
),
radial-gradient(4.8em 1em at center, $spike 3%, transparent 3%),
radial-gradient(
5.6em 15em at center,
transparent 18%,
$dark-green 18%,
$dark-green 40%,
transparent 40%
);
}
&.plant-3 {
width: 4em;
height: 5.6em;
top: calc(52vh - 3.75em - 4.8em);
border-radius: 50% 50% 50% 50%;
background-size: 0.8em 1em, 4em 4em;
background-image: radial-gradient(
$spike 6%,
$spike-faded 6%,
transparent 16%
),
linear-gradient(to right, $dark-green 2em, transparent 2em);
&:before {
width: 4em;
height: 5.6em;
background: inherit;
border-radius: inherit;
transform: translate(80%, -25%) rotate(45deg) scale(0.75);
box-shadow: inherit;
}
&:after {
width: 4em;
height: 5.6em;
background: inherit;
border-radius: inherit;
transform: translate(90%, -75%) rotate(16deg) scale(0.45);
z-index: -1;
box-shadow: inherit;
}
}
&.plant-4 {
width: 3.6em;
height: 8.4em;
top: calc(52vh - 3.75em - 8.4em);
border-radius: 50% 50% 0 0;
background: $light-green;
background-image: repeating-linear-gradient(
to right,
transparent,
transparent 0.8em,
$dark-green 0.8em,
$dark-green 1.1em,
transparent 1.1em
);
&:after {
width: 2.8em;
height: 4.8em;
bottom: 0;
left: -0.8em;
border-radius: 48% 48% 0 0;
background: $lighter-green;
box-shadow: 0.4em 0 1.2em $dark-green;
background-image: inherit;
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.