alternating pictures
am 06.08.2007 04:49:19 von Brian Campbell
I was a site that has alternating pictures on a timer of about 2
seconds. Does anyone know how in HTML I can accomplish this? I looked
at the code and all I coulf find was:
style="background-color:
#000000">
Re: alternating pictures
am 06.08.2007 09:40:41 von jkorpela
Scripsit slinky:
> I was a site that has alternating pictures on a timer of about 2
> seconds.
Nasty, isn't it?
> Does anyone know how in HTML I can accomplish this?
Thank &Deity;, there is no way in HTML to do such things.
> I looked
> at the code and all I coulf find was:
>
> style="background-color:
> #000000">
So you saw a fragment of relatively clueless markup. Of course the
alternating effect has been created with tools external to CSS, probably
some piece of crappy JavaScript. Thanks for reminding me why disabling
JavaScript is useful.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: alternating pictures
am 06.08.2007 09:45:35 von Ben C
On 2007-08-06, Jukka K. Korpela wrote:
> Scripsit slinky:
>
>> I was a site that has alternating pictures on a timer of about 2
>> seconds.
>
> Nasty, isn't it?
>
>> Does anyone know how in HTML I can accomplish this?
>
> Thank &Deity;, there is no way in HTML to do such things.
>
>> I looked
>> at the code and all I coulf find was:
>>
>> style="background-color:
>> #000000">
>
> So you saw a fragment of relatively clueless markup. Of course the
> alternating effect has been created with tools external to CSS, probably
> some piece of crappy JavaScript. Thanks for reminding me why disabling
> JavaScript is useful.
It could also have been an animated gif.
Re: alternating pictures
am 06.08.2007 15:47:35 von Andy Dingley
On 6 Aug, 03:49, slinky wrote:
> I was a site that has alternating pictures on a timer of about 2 seconds.
A URL would have been helpful.
> Does anyone know how in HTML I can accomplish this?
You can't, at least not with plain HTML / CSS alone. You will need
something else as well, although this could be very simple.
If the image is "GIF friendly" (i.e. just a bit of graphic design
flummery, not a photograph) then you could do this easily with an
animated GIF. If it's only two images and a snap change (i.e. no slow
morphing between them) then this is still quite a compact way to send
it.
If you want to use two reasonable quality photographs, i.e. using JPG
images, then use JavaScript. It's a really simple example, I'm sure
you can web search a suitable fragment. When you do this, make sure
you code it in such a way that people without JavaScript see at least
one image, or maybe both of them side-by-side.
There are other techniques, but these two are the simple and sensible
ones.
Re: alternating pictures
am 06.08.2007 22:40:35 von Animesh Kumar
Jukka K. Korpela wrote:
> Scripsit slinky:
>
> So you saw a fragment of relatively clueless markup. Of course the
> alternating effect has been created with tools external to CSS, probably
> some piece of crappy JavaScript. Thanks for reminding me why disabling
> JavaScript is useful.
>
Oh it's just an animated gif. And you can disable that too, in firefox
or IE :)
Re: alternating pictures
am 07.08.2007 01:39:09 von Brian Campbell
http://www.jfklancer.com/index.html was where I saw the pictures.
Thanks!
> A URL would have been helpful.
>
> > Does anyone know how in HTML I can accomplish this?
>
> You can't, at least not with plain HTML / CSS alone. You will need
> something else as well, although this could be very simple.
>
> If the image is "GIF friendly" (i.e. just a bit of graphic design
> flummery, not a photograph) then you could do this easily with an
> animated GIF. If it's only two images and a snap change (i.e. no slow
> morphing between them) then this is still quite a compact way to send
> it.
>
> If you want to use two reasonable quality photographs, i.e. using JPG
> images, then use JavaScript. It's a really simple example, I'm sure
> you can web search a suitable fragment. When you do this, make sure
> you code it in such a way that people without JavaScript see at least
> one image, or maybe both of them side-by-side.
>
> There are other techniques, but these two are the simple and sensible
> ones.
Re: alternating pictures
am 07.08.2007 02:45:10 von John Hosking
slinky wrote:
> http://www.jfklancer.com/index.html was where I saw the pictures.
> Thanks!
(In future, please don't top-post.)
The fact that this technique appears on that page is reason enough to
avoid using it. In fact, if you ever have code that resembles any part
of that site's source, change your code.
--
John
Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html