flexbox - 如何在flexlayoutgap中使整体卡的间隙均匀
问题描述
我试图制作一个响应式卡片布局,每张卡片之间的间隙均匀,不幸的是底部空间没有出现在卡片上,但右侧间隙显示,任何人都可以帮助如何实现这种情况。下面是我的代码
html代码
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutAlign="space-around center" fxLayoutGap="25px">
<mat-card *ngFor="let member of members" fxFlex="calc(33%-25px)" fxFlex.sm="calc(50%-25px)" >
堆栈闪电战链接
https://stackblitz.com/edit/card-responsive?file=app/card-overview-example.html
解决方案
问题似乎是fxLayout="row wrap"
功能。医生的建议说要使用fxLayoutGap="10px grid"
,但这更有效。
我想出了这个css3,它解决了你的问题。不是很优雅,灵活布局,但这似乎是一个限制
mat-card.mat-card {
margin-bottom: 10px;
}
推荐阅读
- r - 如何在 R 中将数据框添加为具有匹配名称的顶点属性?
- android - Android webview 返回 navigator.online true
- php - mPDF 仅在 Mac 上打印,出现格式错误:不是 pdf 或在 Windows 上已损坏
- json - Flutter 嵌套 JSON 到列表视图
- laravel-5.7 - Laravel 5.7 动态速率限制不起作用
- playframework - 在所有活动线程完成之前,Play Framework http 响应不会释放
- r - 在 Ubuntu 18.04 上安装包 testthat R 的问题
- android - 使用 Scanner 查找字符串中的值
- reactjs - 我是否在 React 中为后端的每个表创建一个新视图?
- android - 如何使用 OAuth2 在我的改造中添加标题?