Backtop 回到顶部 ​

返回页面顶部的按钮。

基础用法 ​

向下滚动页面即可看到右下角的按钮。

Scroll down to see the bottom-right button.

自定义展示 ​

展示区域为 40px × 40px。

Scroll down to see the bottom-right button.

回到顶部 API ​

回到顶部 属性 ​

名称说明类型默认值
target触发滚动的滚动容器string—
visibility-height滚动高度达到该值后才显示按钮number200
right控制距离右侧距离number40
bottom控制距离底部距离number40

回到顶部 事件 ​

事件名说明类型
click点击时触发Function

回到顶部 插槽 ​

名称说明
default自定义默认内容