为什么捐赠
API 浏览器
联系站长
CSS 定位类

Quasar 提供了一些 CSS 类来帮助您轻松定位 DOM 元素:

类名描述
fullscreen固定位置覆盖整个窗口区域
fixed设置 positionfixed,但不指定 topleftrightbottom 属性
fixed-center设置位置为 fixed 但在窗口中间
absolute设置 positionabsolute,但不指定 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

对齐

类名描述
float-left向左浮动
float-right向右浮动
on-left设置右边距;通常用于与其他兄弟元素一起的图标元素
on-right设置左边距;通常用于与其他兄弟元素一起的图标元素

TIP

我们建议您阅读 Quasar 网格系统,而不是使用 float-leftfloat-right

垂直对齐:

类名描述
vertical-top设置 CSS 垂直对齐为 top
vertical-middle设置 CSS 垂直对齐为 middle
vertical-bottom设置 CSS 垂直对齐为 bottom