尝试找出文本滚动效果
我喜欢在网站上看到的一种效果,并且我一直在仔细地筛选他们的 javascript 和 CSS,看看它是如何完成的。然而,该网站是韩国的,这让它变得更加困难,因为我一开始就不太精通 javascript。
该网站是: http://search.naver.com/search.naver?where=nexearch&query=idolfix&sm=top_hty&fbm=1&ie=utf8
有没有人见过这个效果页面的右上角,页面每隔几秒更新 10 个链接 - 特别是文本滚动到位的方式?
I like an effect that I have seen on a web site and I have been paintstakingly sifting through their javascript and CSS to see how its done. However, the site is Korean and to make it more difficult, I am not too well versed in javascript to begin with.
The site is:
http://search.naver.com/search.naver?where=nexearch&query=idolfix&sm=top_hty&fbm=1&ie=utf8
Has anyone ever seen the effect on the top right of the page where the page is updating the 10 links every few seconds - specifically the way the text scrolls in place?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
他们有一个带有
overflow:hidden
的包装 div。然后在该 div 内有 2 个 div,分别包含当前值和下一个值。
效果完成后,您只需将
.next
设为.current
,然后使用 AJAX 添加一个新的.next
值。首先,
.next
div 位于 .wrapper 的外部(实际上在下面),然后他们将其向上移动。使用 jQuery 同时移动两个 div 可以轻松实现此效果。
这是一个实例: http://jsfiddle.net/tusbar/GFZTE/
They have a wrapper div that has
overflow: hidden
.Then inside that div they have 2 divs with the current and the next value.
After the effect you just have to make the
.next
the.current
one, and add a new.next
value with AJAX.At first, the
.next
div is outside the .wrapper (underneath actually), then they move it up.The effect could easily be done with jQuery moving the two divs at the same time.
Here's a live example: http://jsfiddle.net/tusbar/GFZTE/