Quasar 使用以下 CSS 斷點
Window Size | Name | Min-width threshold in pixels | Max-width threshold in pixels |
---|---|---|---|
Extra Small | xs | 0px | 599.99px |
Small | sm | 600px | 1023.99px |
Medium | md | 1024px | 1439.99px |
Large | lg | 1440px | 1919.99px |
Extra Large | xl | 1920px | Infinity |
To learn how to use them, please visit the Visibility page.
You might also want to take a look at the Introduction to Flexbox on the “Responsive Design” section.
Sass
您也可以在 Sass 中使用斷點
@media (max-width: $breakpoint-xs-max)
font-size: 10px
content_paste
這些變數的語法如下所示,其中 <breakpoint>
會被替換為 “xs”、“sm”、“md”、“lg” 或 “xl”
$breakpoint-<breakpoint>-min
$breakpoint-<breakpoint>-max
content_paste
There’s also
$sizes.<breakpoint>
// replace <breakpoint> with xs, sm, md, lg or xl
content_paste
If enabled (only), you can also style your content based on a particular set of CSS classes applied to document.body: screen--xs
, screen--sm
, …, screen--xl
.
.my-div
body.screen--xs &
color: #000
body.screen--sm &
color: #fff
content_paste