t-scroll

隐藏滚动条,但仍可以滚动

我只是一个虾纸丫 提交于 2020-08-11 22:24:23
问题: I want to be able to scroll through the whole page, but without the scrollbar being shown. 我希望能够滚动浏览整个页面,但不显示滚动条。 In Google Chrome it's: 在Google Chrome浏览器中: ::-webkit-scrollbar { display: none; } But Mozilla Firefox and Internet Explorer don't seem to work like that. 但是Mozilla Firefox和Internet Explorer似乎无法正常工作。 I also tried this in CSS: 我也在CSS中尝试过: overflow: hidden; That does hide the scrollbar, but I can't scroll any more. 那确实隐藏了滚动条,但是我不能再滚动了。 Is there a way I can remove the scrollbar while still being able to scroll the whole page? 有什么办法可以删除滚动条,同时仍然可以滚动整个页面? With just CSS or HTML, please

CoordinatorLayout三部曲学习之三:AppBarLayout联动源码学习

久未见 提交于 2019-12-01 17:54:38
今天学习整理一下AppBarLayout与CoordinatorLayout以及Behavior交互逻辑的过程,首先使用一张图先概括一下各个类主要功能吧(本文章使用NestedScrollView充当滑动的内嵌子View)。 CoordinatorLayout实现NestedScrollingParent2接口,用于处理与滑动子View的联动交互(这里使用的是NestedScrollView),实际上交由Behavior进行处理,CoordinatorLayout为其代理类。 AppBarLayout中默认使用了AppBarLayout.Behavior,主要功能是接收CoordinatorLayout传输过来的滑动事件,并且相对应的进行处理,如NestedScrollView往上滑动到头时候,继续滑动则移动AppBarLayout到头。 NestedScrollView实现了NestedScrollingChild2接口,用于传输给CoordinatorLayout,并且消费CoordinatorLayout不消费的触摸事件,其中还是使用了AppBarLayout.ScrollingViewBehavior,功能是进行监听AppBarLayout的位移变化,从而进行相对应的变化,最明显的例子就是AppBarLayout上移过程中,NestedScrollView一起上移。