开发者

How to create "scrolling headlines" in JavaScript?

There is a heading and some text with an image under that heading. The text with that image should scroll vertically upwards. where as the heading should change according to the text. For example, lets say I have a news headline

  1. JAPAN EarthQuake: Some Description about Japan Disaster with an image
  2. India Politics: Some latets news about Indian Politics with an image

etc

I need a script which can first show JAPAN EarthQuake heading and under it, the des开发者_如何学编程ription with image will scroll upwards. Once the scroll is complete or after some time, it will change the heading to India Politics and show its description with its image under it which will again scroll upwards.

How can I achieve this using JavaScript? Any available script online anywhere or some demo?


Used this one before

Animated Scroll

Dead easy to use and set up using ul > li tags


JavaScript animations are notoriously difficult to perform in a cross browser. I would take a look at using a framework like jQuery in order to perform them.

Look for the animate() method.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜