Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须像在 pinterest 中一样对齐不同高度的卡片。我在反应语义中没有找到任何解决方案。建议我解决方案。
如果你想不费力气地解决这个问题,你可以试试gestalt——一个遵循 Pinterest 设计语言的 React UI 库。
使用这个库的原因可能是,您需要对齐具有不同高度的各种卡片。
该库有一个 Collage 完全可以解决您面临的问题的组件。
Collage
使用该组件,我能够正确对齐不同尺寸的图像,例如 -
上面的源代码位于此处。