<div class="wrapper">
  <div class="fixed-child">I'm Fixed Elements</div>
</div>
<div class="wrapper exception">
  <div class="fixed-child">I'm Fixed Elements</div>
</div>
body {
  height: 200vh;
  display: flex;
  gap: 10px;
}
.wrapper {
  width: 200px;
  height: 200px;
  border: solid;
}
.wrapper.exception {
  transform: scale(1);
}

.fixed-child {
  position: fixed;
  width: 100px;
  height: 100px;
  border: solid;
  background: skyblue;
}
.wrapper.exception .fixed-child {
  background: magenta;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.