Float 浮动

8/10/2022 布局浮动

# 何时使用

import { HiFloat } from 'hi-kits/float'
1

# 基本用法

通过设置dir 可将元素浮动到指定位置。查看页面左上角和右上角

TL TL TL TR TR TR
<h-float dir="topleft">
    <h-space gutter="30" dir="vertical">
        <h-button shape='circle' type="primary">TL</h-button>
        <h-button shape='circle' type="primary">TL</h-button>
        <h-button shape='circle' type="primary">TL</h-button>
    </h-space>
</h-float>
 <h-float dir="topright">
    <h-space gutter="10" dir="vertical">
        <h-button shape='circle' type="primary">TR</h-button>
        <h-button shape='circle' type="primary">TR</h-button>
        <h-button shape='circle' type="primary">TR</h-button>
    </h-space>
</h-float>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Expand Copy

# 参数说明

参数 说明 类型 可选值 默认值
dir 浮动位置 string 'top' | 'right' | 'bottom' | 'left' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' -
Last Updated: 4/25/2023, 16:14:30