<div class="container">
  <div class="ball">
    <div class="iris"></div>
    </div>
  <div class="shadow"></div>
  </div>
body {
  background-color: #F5B7B1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  position: relative;   
}

.ball {
  overflow: hidden;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  position: relative;
  background-color: white;
  box-shadow:inset -5px -5px 5px rgba(0,0,0,0.07);
  animation: bounceball alternate infinite 400ms 40ms ease-in-out;
}
.iris {
  width: 40%;
  height: 40%;
  left: 30%;
  top: 30%;
  border-radius: 50%;
  background-color: #229954;
  position: absolute;
}
.iris:before {
  content: "";
  position: absolute;
  width: 35%;
  height: 35%;
  border-radius: 50%;
  top: 30%;
  left: 30%;
  background-color: black;
}

.iris:after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  top: 22%;
  left: 20%;
  background-color: rgba(255, 255, 255, 0.43);
}

@keyframes bounceball { 
  to { transform: scaleX(1.03) scaleY(0.97); } 
}
.shadow {
  position: absolute;
  width:160px;
  height: 60px;
  border-radius:50%;
  background-color: rgba(0,0,0,0.09);
  top:190px;
  left:14px;
  animation: bounceball alternate infinite 400ms 40ms ease-in-out;
}
$(function() {
  var midWidth = Math.floor($(window).width() / 2);
  var midHeight = 100;
  var mousePos = {
    x: midWidth,
    y: midHeight
  };
  $(document).mousemove(function(event) {
    mousePos.x = event.pageX;
    mousePos.y = event.pageY;
    var transX = mousePos.x - midWidth;
    var transY = mousePos.y - midHeight;
    var skewX = 0;
    if (transX > -30 && transX < 30 && transY < 0) {
      skewX = transX / 2;
    } else if (transX > -30 && transX < 30 && transY >= 0) {
      skewX = -(transX / 2);
    } else if (transX > 30) {
      skewX = -(transY / 2);
    } else if (transX < -30) {
      skewX = transY / 2;
    }
    if (transX >= 30) {
      transX = 30;
    } else if (transX <= -30) {
      transX = -30;
    }
    if (transY >= 30) {
      transY = 30;
    } else if (transY <= -30) {
      transY = -30;
    }

    if (skewX >= 15) {
      skewX = 15;
    } else if (skewX <= -15) {
      skewX = -15;
    }
    $('.iris').css({
      "transform": "translateX(" + transX + "px) translateY(" + transY + "px) skewX(" + skewX + "deg) skewY(2deg)"
    });

  });

});
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js