 margin: 250px 0;
}

#anchored1 {
  position: absolute;
  position-anchor: --a1;
  background: green;
  position-try-fallbacks: --fallback;
  anchor-name: --a2;
  left: anchor(left);
  bottom: anchor(top);
}

#anchored2 {
  position: absolute;
  position-anchor: --a2;
  left: anchor(left);
  top: anchor(bottom);
  background: lime;
}

@position-try --fallback {
  left: anchor(right);
  top: anchor(top);
  bottom: auto;
}

</style>

<div id="scroller">
  <div id="anchor"></div>
</div>
<div id="anchored1"></d