body {
    display: block;
    margin: 0;
}

img
{
    
   display: block;
   margin-left: auto;
   margin-right: auto;
    position: relative;
    width: 60%;
    margin-top: 5%;
}

.bg {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 300% 300%;
  background-image: linear-gradient(-35deg, yellow 5%, #b20ed4 50%, pink 100%);
  -webkit-animation: AnimateBG 60s ease infinite;
          animation: AnimateBG 40s ease infinite;
}

@-webkit-keyframes AnimateBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes AnimateBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}