css - 路由器插座的粘性底部元件
问题描述
结构:
<app-header></app-header>
<router-outlet></router-outlet>
<app-footer></app-footer>
一个组件有一个我想粘在底部的按钮。像:
position: -webkit-sticky;
position: sticky;
bottom: 1rem;
align-self: flex-end;
但是您看到有一个app-footer
- 在页脚部分向下滚动时,我的按钮不会粘在底部。如何使其底部也位于页脚上方?
解决方案
为您的按钮使用固定位置
.button-class {
position: fixed;
bottom: 1rem;
}
推荐阅读
- sql - 如何在 hive 中使用 regexp_extract
- javascript - 如何在 rxjs 中将多个订阅链接到可观察对象中的可观察对象?
- python - pyspark:方法 isBarrier([]) 不存在
- python - Python sys.argv - 获取完整的命令行 [使用管道或分号]
- jwt - Keycloak 使用 Istio 和 JWT 提供无效签名
- wordpress - 如何将两组帖子传递给wordpress模板
- python - 软件可以做些什么来防止另一个应用程序使用 PostMessage 向其窗口注入消息?
- git - 执行 git fetch 或 git pull 时如何在客户端拒绝 GIT 强制更新?
- c++ - 枚举值的组合爆炸(729 个组合...)
- python - 防止 symfit 模型共享参数对象