CSS 定位类
Quasar 提供了一些 CSS 类,可帮助你轻松定位 DOM 元素:
¥There are CSS classes supplied by Quasar to help you position a DOM element easily:
类名 | 描述 |
---|---|
fullscreen | 固定位置覆盖所有窗口空间 |
fixed | 将 position 设置为 fixed ,但不指定 top 、left 、right 或 bottom 属性。 |
fixed-center | 将位置设置为 fixed ,但位于窗口中间。 |
absolute | 将 position 设置为 absolute ,但不指定 top 、left 、right 或 bottom 属性。 |
absolute-center | 将位置设置为 absolute ,但位于容器中间(容器需要相对位置)。 |
fixed-top absolute-top | 固定或绝对位置到屏幕顶部 |
fixed-right absolute-right | 固定或绝对位置到屏幕右边缘 |
fixed-bottom absolute-bottom | 固定或绝对位置到屏幕底部 |
fixed-left absolute-left | 固定或绝对位置到屏幕左边缘 |
fixed-top-left absolute-top-left | 固定或绝对位置到屏幕左上角 |
fixed-top-right absolute-top-right | 固定或绝对位置到屏幕右上角 |
fixed-bottom-left absolute-bottom-left | 固定或绝对位置到屏幕左下角 |
fixed-bottom-right absolute-bottom-right | 固定或绝对位置到屏幕右下角 |
fixed-full absolute-full | 固定或绝对位置到所有屏幕边缘 |
relative-position | 将位置设置为 relative |
对齐(Alignment)
¥Alignment
类名 | 描述 |
---|---|
float-left | 向左浮动 |
float-right | 向右浮动 |
on-left | 设置右侧小边距;通常用于与其他同级元素一起的图标元素 |
on-right | 在左侧设置一个小的边距;通常用于与其他同级元素一起的图标元素 |
提示
我们建议你阅读 Quasar 网格系统的相关内容,而不是使用 float-left
或 float-right
。
¥Instead of using float-left
or float-right
we recommend that you read on the Quasar Grid System.
垂直对齐方式:
¥Vertical alignment:
类名 | 描述 |
---|---|
vertical-top | 将 CSS 垂直对齐设置为 top |
vertical-middle | 将 CSS 垂直对齐设置为 middle |
vertical-bottom | 将 CSS 垂直对齐设置为 bottom |