ant-design / ant-design-mobile

Essential UI blocks for building mobile web apps.

Home Page:https://mobile.ant.design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Button 怎麼設置吸底?

s1410422008 opened this issue · comments

Version of antd-mobile

5.33.0

Description

我在官方的 Figma 設計檔中有看到 7.吸底按鈕,認知是內容滾動時,按鈕可以固定在下方,但我找不到官方實作說明,想問這個功能該如何實現?
2023-12-07_15-42

吸底是组合按钮的布局设计,不是组件的属性,你在实现的时候直接用样式就行了哈:

<div style={{ position: 'fixed', left: 0, right: 0, bottom:0, padding: 16 }}>
  <Button block ... />
</div>

如果是滚动吸附也可以考虑使用 Sticky 样式~