<div class="toggleWrapper">
  <input type="checkbox" id="toggle"/>
  <label for="toggle" class="toggle">
  </label>
</div>

<a class="author" href="https://itsmenatalie.com" target="_blank">Created by ItsMeNatalie</a>
body {
  position: relative;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #222;
  overflow: hidden;
  
  .toggleWrapper {
  position: relative;
  transition: all .3s ease-in;
  width: 300px;
  height: 100px;
  background-color: #6e5773;
  border-radius: 0 125px 125px 0;
  border: 5px solid #e9e2d0;
  
  input {
    display: none;
  }
  
  .toggle {
    transition: all 1.5s ease-in-out;
    position: absolute;
    top: 9px;
    left: 9px;
    height: 82px;
    width: 82px;
    background-color: #ea9085;
    transform: rotate(0deg);
    box-shadow: 0 0 5px 0 rgba(0,0,0,0.5);
    cursor: pointer;
  }
  
  input:checked {
    & + .toggle {
      background-color: #d45d79;
      height: 86px;
      width: 86px;
      border-radius: 50%;
      top: 7px;
      left: 206px;
      transform: rotate(360deg);
      box-shadow: 0 0 5px 0 rgba(0,0,0,0.75);
    }
  }
}
  
  a {
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    position: absolute;
    left: calc(50% - 96px);
    bottom: 0;
    font-style: italic;
    font-size: 12px;
    color: #212121;
    background-color: white;
    padding: 10px 20px;
    border-radius: 5px 5px 0 0;
    box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.25);
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.