2020
12-10
12-10
uniapp开发小程序实现滑动页面控制元素的显示和隐藏效果
前言实现思路:通过小程序API中的触摸事件,配合CSS来实现元素的显示和隐藏。ps(也想过另一种通过监听页面滚动的方式来实现,不过效果一定很差0.0)一、需要用到的事件touchmove、touchend二、话不多说上代码1.看需求,如果是整个屏幕滑动后元素发生变化,最好放在最外面的view代码如下:<viewclass="container"@touchmove="handletouchstart"@touchend="handletouchend"><viewclass="columnpopupfx":class="specClass"@c...
继续阅读 >