<div class="wrapper">
  <img src="https://www.w3cplus.com/sites/default/files/blogs/2020/2004/css-circle-image-2.jpg" alt="">

  <img src="https://www.w3cplus.com/sites/default/files/blogs/2020/2004/cat-toes-paw-number-paws-tiger-tabby.jpg" alt="">
</div>

<div class="control">
  <label for="check">
    <input type="checkbox" name="check" id="check">border
  </label>
</div>
@import url("https://fonts.googleapis.com/css?family=Gochi+Hand");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #291642;
  font-family: "Gochi Hand", sans-serif;
  font-size: 130%;
  letter-spacing: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

img {
  border-radius: 50%;
  width: 30vmin;
  height: 30vmin;
  object-fit: cover;
  object-position: center;
  margin: 5vmin;
  transition: all 0.2s ease;
}

div {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 5vmin;
}

label {
  display: flex;
  align-items: center;
  color: #fff;
  line-height: 1;
}

input {
  margin: 0 5px 0 0;
  position: relative;
  top: -0.1em;
}
View Compiled
const checkEle = document.querySelector("#check");

const imgEles = document.querySelectorAll("img");

checkEle.addEventListener("click", (e) => {
  if (e.target.checked) {
    imgEles.forEach((img) => {
      console.log(img);
      img.style.border = "5px solid #f36";
    });
  } else {
    imgEles.forEach((img) => {
      console.log(img);
      img.style.border = "none";
    });
  }
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.