【发布时间】:2020-01-15 02:17:33
【问题描述】:
我有一个这样的基本布局:
Cell 0 Cell 1 Cell 2 <!-- these are not to appear in actual render
__________________________________
| Image 0 | Image 1 | Image 2 |
|----------| Image 1 |-----------
| text here| Image 1 | text here|
----------------------------------
Cell 3 Cell 4 Cell 5 <!-- these are not to appear in actual render
__________________________________
| Image 3 | Image 4 | Image 5 |
|----------|----------| Image 5 |
| text here| text here| Image 5 |
----------------------------------
根据屏幕大小,每行应该有 4 个单元格、3 个单元格、2 个单元格或 1 个单元格。
图像应占据整个单元格,并在大小上与其他单元格中的图像对齐。
我的一些尝试:https://stackblitz.com/edit/angular-gk58tk
对于网格、mat-card 和类似的情况,这是一个不常见的用例吗?
我做错了什么?
【问题讨论】:
-
寻求代码帮助的问题必须包括在问题本身中重现它所需的最短代码,最好是在堆栈片段中。尽管您已经提供了一个链接,但如果它变得无效,那么您的问题对于未来遇到同样问题的其他 SO 用户将毫无价值。见Something in my website/example doesn't work can I just paste a link。
-
好的,我正在处理 Stack Snippet。有Angular的例子吗? - 我尝试发布渲染的输出,但它给了我一个字符限制错误。
-
虽然你已经解决了这个问题,但我想分享这篇在这个意义上看起来很有前途的文章(我没有机会测试它,但通读它我可以说它非常相关问题):zoaibkhan.com/blog/…
标签: angular responsive-design angular-material css-grid angular-flex-layout