Camp Fire by

Luiz Ot Carvalho

On: 4 Jul 2016

Personal site: http://codepen.io/superoak

<div class="circle">
  <div class="floor">
    <div class="shadow"></div>
  </div>
  <div class="glow"></div>
  <div class="flame"></div>
  <div class="log log-1"></div>
  <div class="log log-2"></div>
  <div class="log log-3"></div>
</div>
body {
  background-color: #46352b;
}

.circle {
  position: absolute;
  left: 50%;
  top: 30px;
  margin-left: -150px;
  width: 300px;
  height: 300px;
  overflow: hidden;
  border-radius: 50%;
  text-align: center;
  background: linear-gradient(to bottom right, #3498db, #2980b9);
}

.flame,
.flame:after,
.flame:before {
  border-radius: 0 50% 50% 50%;
}

.floor {
  width: 300px;
  height: 80px;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: linear-gradient(to bottom right, #2ecc71, #27ae60);
}

.flame {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -50px;
  margin-top: -50px;
  z-index: 4;
  transform: rotate(45deg);
  width: 100px;
  height: 100px;
  background-color: #cd333f;
  animation: flame 500ms ease-in-out infinite alternate;
}
.flame:after, .flame:before {
  position: absolute;
  content: "";
  animation: Innerflame 500ms ease-in-out infinite alternate;
}
.flame:before {
  background-color: orange;
  width: 75px;
  height: 75px;
  bottom: 5px;
  left: 50%;
  margin-left: -30px;
  animation-direction: alternate-reverse;
}
.flame:after {
  background-color: #edc951;
  width: 50px;
  height: 50px;
  bottom: 10px;
  left: 50%;
  margin-left: -10px;
  animation-duration: 450ms;
}

.glow {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 20px;
  margin-left: -100px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: white;
  opacity: .1;
  animation: glow 500ms ease-in-out infinite alternate;
}

.log {
  z-index: 3;
  position: absolute;
  bottom: 75px;
  width: 150px;
  height: 30px;
  background-color: #352b21;
  border-radius: 0 10px 10px 0;
}
.log:before, .log:after {
  position: absolute;
  content: "";
  border-radius: 50%;
}
.log:after {
  left: -9px;
  bottom: 7px;
  width: 10px;
  height: 10px;
  border: 3px outset #b38054;
}
.log:before {
  left: -15px;
  bottom: 0;
  width: 30px;
  height: 30px;
  background-color: #d7a477;
}
.log.log-1 {
  left: 50px;
  transform: perspective(400px) rotateY(45deg);
}
.log.log-2 {
  right: 50px;
  transform: perspective(400px) rotateY(-45deg) scale(-1, 1);
}
.log.log-3 {
  width: 0;
  height: 30px;
  bottom: 65px;
  left: 150px;
}

.shadow {
  position: absolute;
  left: 50px;
  bottom: 55px;
  width: 200px;
  height: 50px;
  z-index: 2;
  border-radius: 50%;
  background-color: #000;
  opacity: .1;
}

@keyframes flame {
  from {
    transform: scale(1) rotate(40deg);
  }
  to {
    transform: scale(1.1) rotate(50deg);
  }
}
@keyframes Innerflame {
  from {
    transform: rotate(-5deg);
  }
  to {
    transform: rotate(5deg);
  }
}
@keyframes glow {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.2);
  }
}

43