css - 添加修复类时的角度平滑滚动
问题描述
当第一次滚动完成时,我的标题得到固定位置,但我的挑战是 => 滚动不平滑并突然改变位置
.sticky-part {
position: fixed;
z-index: 9999;
width: 100%;
background-color: white;
height: 95px;
}
scroll = (): void => {
if (window.scrollY == 0) {
this.isScroll = false;
}
else {
this.isScroll = true;
}
};
<div class="header-container" [class.sticky-part]="(showMessageBox | async) && !isHome && isScroll"></div>
解决方案
推荐阅读
- java - 如何在回收站视图中自动滚动到最新消息?
- hyperledger-fabric - 需要帮助概念化区块链工业 4.0 项目
- java - 无法使用 Retrofit HTTP 发布数据,但能够使用命令行发布
- python - 迭代时间序列
- node.js - 当我在 subscription.on('message') 函数中抛出错误时,node-nats-streaming 客户端断开连接
- nlp - BERT 预训练:[SEP] 与段嵌入?
- python - 应用 IntegerType 将一些实例转换为负值
- php - simplexml_load_string asXML 不为空,但 children() 函数返回空?
- algorithm - 通过 Kotlin 整个点的最短路径
- c++ - DirectX 未检测到所有显卡