I am creating a 650 X 610 px historical railway map and would like to start with a blank map, then fade in transparent .png layers containing just a fragment of the railway, one on top of the other, building up to an image of the whole network.
There would be a list of the dates the network was extended to click and make that bit of line appear. Easily done using solid images, but very slow and there are 31 images.
I couldn't find any forum queries about this anywhere. Please could anyone help?
Try this simple example (tested in Opera 10 and Firefox 2). Each image must be of the same dimension. Meaning that each layer is placed at the same location.
What you should change are:
All
width
andheight
values (in pixels) within<style>
block to match your complete map.The
layerdata
array, which contains an object for each layer's date selection text (date
) and the URL of the image (url
).animdelay
. Delay in millisecond (1/1000 second) unit per opacity level for fade in/out. The default is 100ms. There's a total of 10 opacity levels. Decrease the delay to speed up the animation.sample.html
: