开发者

javascript carousels: change position or scroll offset?

开发者 https://www.devze.com 2023-03-13 13:00 出处:网络
While there are a ton of jQuery carousel plugins out there, I like to roll my own. Reading through their code I\'ve noticed that people manipulate either scrollLeft or position (left: -100px) in orde

While there are a ton of jQuery carousel plugins out there, I like to roll my own.

Reading through their code I've noticed that people manipulate either scrollLeft or position (left: -100px) in order to "move" the carousel.

Which one is b开发者_运维问答etter? Are there any performance benefits from one or the other?


example using scroll: http://jqueryfordesigners.com/jquery-infinite-carousel/

0

精彩评论

暂无评论...
验证码 换一张
取 消