Angular Material 6 网格列表将 align-items 和 justify-content 对齐到 flex-start [英] Angular Material 6 grid list align-items and justify-content to flex-start
本文介绍了Angular Material 6 网格列表将 align-items 和 justify-content 对齐到 flex-start的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 Angular Material 6 动态网格列表.与文档相关的示例将网格的内容放在每个图块的中心.查看示例此处
I'm trying to use Angular Material 6 Dynamic grid-list. The example relating to the documentation puts contents of the grid in the centre of each tile. See example here
我希望内容位于每个磁贴的左上角.
I want the content to go in the top left hand corner of each tile.
我尝试了以下 css,但它不起作用.
I have tried the following css which does not work.
.mat-grid-tile .mat-figure {
justify-content: flex-start;
align-items: flex-start;
}
推荐答案
放入styles.css
:
.mat-grid-tile .mat-figure {
justify-content: flex-start !important ;
align-items: flex-start !important;
}
这篇关于Angular Material 6 网格列表将 align-items 和 justify-content 对齐到 flex-start的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文