<img src="https://images.unsplash.com/photo-1444807016527-23eae0a4b246?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&s=8f298ee069b063f6686c77867310a849" alt="" />
body{
  padding: 30px;
  background-color: rgb(230,230,230);
}
img{
  border-radius: 50%;
  width: 200px;
  position: relative;
  display: block;
  margin: 0 auto;
  border: thin solid orange;
  animation: cos 3s infinite linear alternate ;
}
@keyframes cos {
  0% {transform: rotate(-45deg); left: -50px}
  100% {transform: rotate(45deg); left: 50px}
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.