我在 Framer.js 中进行原型设计。我有一个滚动组件和滚动内容,我正在尝试打印内容的当前 x 或 scrollX 位置。因此,如果我向右滚动 500px,代码将打印 500
Bg = new BackgroundLayer
backgroundColor: 'FFF'
scroll = new ScrollComponent
width: 750
height: 1334
scrollVertical: false
layerA = new Layer
width: 750 * 5
height: 1334
superLayer: scroll.content
layerA.style.background = "-webkit-linear-gradient(45deg, #2AF 0%, #F00 100%)"
# get current x value of scroll content
print layerA.scrollX
成帧器演示:http ://share.framerjs.com/70pi1l6is76t/
Codepen 演示:http ://codepen.io/matter/pen/78fc798001529418123b84470ea8c625?editors=0010
先感谢您,