.ham{
  width: 50px;
  height: 50px;
  display: flex;
  flex-direction: column;
  background-color: green;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  position: relative;
  z-index: 2;
}
.ham span{
  width: 16px;
  height: 2px;
  display: block;
  background-color: white;  
}
.ham::after{
  content: "";
  display: block;
  background-color: green;
  border-radius: 50%;
  background-size: 50px;
}
.ham span:nth-child(1){
  margin-bottom: 5px;
  transition: 0.5s;
}
.ham span:nth-child(2){
  transition: 0.5s;
}
.ham.x span:nth-child(1){  
  transform: translateY(3.5PX)rotate(45deg);
}
.ham.x span:nth-child(2){
  transform: translateY(-3.5PX)rotate(-45deg);
}