【问题标题】:How to display certain elements of a list as sticky elements without adding any hierarchy in rendering?如何在不添加任何层次结构的情况下将列表的某些元素显示为粘性元素?
【发布时间】:2020-07-28 10:31:30
【问题描述】:

我有一个chat view,当用户滚动消息like this而不添加呈现或分组数据中的任何层次结构。我应该如何做到这一点?

【问题讨论】:

    标签: javascript css reactjs list sticky


    【解决方案1】:

    Bootstrap 中的 sticky-top 类会有所帮助吗?

    文档参考:

    https://getbootstrap.com/docs/4.5/utilities/position/#sticky-top

    Position an element at the top of the viewport, from edge to edge, but only after you scroll past it.
    

    【讨论】:

    • 我怕sticky-topsticky 有同样的缺点,可能解决不了问题
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-28
    • 2014-10-02
    • 2012-06-16
    • 2022-12-07
    相关资源
    最近更新 更多