<img src="https://picsum.photos/id/1051/250/250" alt="a river and a mountain">
<img src="https://picsum.photos/id/1011/250/250" alt="a kayak women">
img {
  --_g: 10% /45% 45% no-repeat linear-gradient(#000 0 0);
  --m:
    left   var(--_i,0%) top    var(--_g),
    bottom var(--_i,0%) left   var(--_g),
    top    var(--_i,0%) right  var(--_g),
    right  var(--_i,0%) bottom var(--_g);
  -webkit-mask: var(--m);
          mask: var(--m);
  outline: 100vmax solid #00B4FF;
  outline-offset: -100vmax;
  transition: .3s linear;
  cursor: pointer;
}
img:hover {
  --_i: 10%;
  outline-color: #0000;
}

body {
  margin: 0;
  background: #FF8C94;
  display: grid;
  min-height: 100vh;
  grid-auto-flow :column;
  place-content: center;
  gap: 40px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.