flex.sm与flex.md与fxFlex.lg和fxFlex.gt-lg之间有什么区别?

时间:2019-11-25 23:22:30

标签: html css angular flexbox

我确实理解小,中,大和粗于大的含义。我已经阅读了https://github.com/angular/flex-layout/wiki/Responsive-APIhttps://getbootstrap.com/docs/4.3/utilities/flex/等。但是我不明白sm,md,lg和gt-lg怎么一起工作。

例如下面的代码是什么意思?

<div fxFlex="100" fxFlex.sm="50" fxFlex.md="60" fxFlex.lg="70" fxFlex.gt-lg="80">

1 个答案:

答案 0 :(得分:3)

该行可以如下分解:

fxFlex="100" - default to 100% width 
fxFlex.sm="50" - on small screens, use 50% width
fxFlex.md="60" - on medium screens, use 60 % width
fxFlex.lg="70" - on Large screens, use 70% width
fxFlex.gt-lg="80" - on Anything greater than a large screen use 80% width