<form class="parent">
  <input type=text class="child child1" placeholder="Click me"></input>
  <input type="radio" class="child child2"></input>
  <button class="child child3">Click Me</button>
</form>
body, html {
  margin: 0;
  height: 100%;
  width: 100%;
}

.parent {
  background-color: rgb(26, 26, 26);
  height: 100%;
  width: 100%;
  position: relative;
}

.parent:focus-within {
  background-color: white;
}

.child {
  color: rgb(26, 26, 26);
  position: absolute;
}

.child1 {
  font-size: 20px;
  padding: 10px;
  left: 50px;
  top: 50px;
}

.child2 {
  left: calc(50%);
  top: 60px;
}

.child3 {
  font-size: 18px;
  right: 50px;
  top: 50px;
  padding: 15px 50px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.