API 浏览器
CSS 定位类

Quasar 提供了一些 CSS 类,可帮助你轻松定位 DOM 元素:

¥There are CSS classes supplied by Quasar to help you position a DOM element easily:

类名描述
fullscreen固定位置覆盖所有窗口空间
fixedposition 设置为 fixed,但不指定 topleftrightbottom 属性。
fixed-center将位置设置为 fixed,但位于窗口中间。
absoluteposition 设置为 absolute,但不指定 topleftrightbottom 属性。
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-leftfloat-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