How to achieve "hierarchical perspective"?

This is rather bizarre, but CSS3D has (for lack of a name) “hierarchical perspective”. For example, see this pen:

In the pen, each div has a perspective of 400 which is relative to each div’s parent perspective! The deeps the div, the more pronounced the distortion.

How might we achieve this sort of perspective in Three.js?

What’s really interesting is that all the divs still intersect in 3D space!

F.e., here’s one with even more divs: