幻灯片问题 [英] slideshow question

查看:105
本文介绍了幻灯片问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



javascript新手。我正在试图理解我在网站上的脚本是如何在工作中获得的。
http://www.BRPPISAFETY.COM

差不多了,但我更改了名为''crossFadeDuration'的变量'

对于大数字和小数字但它似乎什么也没做。可以

有人解释改变这个变量会带来什么影响和

为什么我看不到任何变化。

非常感谢

David

Hi
New to javascript. I''m trying to understand how a script at a website I come
across works.
http://www.BRPPISAFETY.COM
Nearly got it but I have changed the variable called ''crossFadeDuration''
to large numbers and small numbers but it doesn''t seem to do anything. Could
someone explain what effect changing this variable should bring about and
why don''t I see any changes.
many thanks
David

推荐答案

它试图在

MSIE。

使用document.all它检测资源管理器,然后设置用过滤器更改

图像并启动它,设置转换

给定值的持续时间参数。如果没有检测到MSIE,那么只需要b / b
翻转图像,忽略所有过滤器部分。但似乎它已经损坏了。$ / b

这件作品:


document.images.SlideShow。 style.filter =" blendTrans(duration = 2)";

document.images.SlideShow.style.filter =" blendTrans(duration = crossFadeDuration)" ;;


第一行只是设置为2秒,但是第二行立即用字符串crossFadeDuration覆盖值。 (因为

反对变量crossFadeDuration的值)。


我打赌作者的意思是


文件.images.SlideShow.style.filter =" blendTrans(duration =" + crossFadeDuration +")" ;;

it attempts to use Microsoft''s proprietary filters (CSS extension) in
MSIE.
Using document.all it detects Explorer, then sets up changing the
image with the filters and starts it, setting up the transformation
duration parameter to the value given. If no MSIE is detected it just
flips images, disregarding all the filters part. But it seems it''s
broken.

The piece:

document.images.SlideShow.style.filter="blendTrans (duration=2)";
document.images.SlideShow.style.filter="blendTrans (duration=crossFadeDuration)";

The first line would just set it to 2 seconds, but immediately the
second line overrides the value with string "crossFadeDuration" (as
opposed to value of variable crossFadeDuration).

I bet what the author meant was

document.images.SlideShow.style.filter="blendTrans (duration="+crossFadeDuration+")";




< bw **** @ gmail.com>在消息中写道

news:11 ********************** @ g44g2000cwa.googlegr oups.com ...

<bw****@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
它试图在MSIE中使用微软的专有过滤器(CSS扩展名)。
使用document.all它检测资源管理器,然后设置用过滤器更改
图像并启动它,将转换
持续时间参数设置为给定的值。如果没有检测到MSIE,它只是翻转图像,忽略所有过滤器部分。但似乎它被打破了。

这篇文章:

document.images.SlideShow.style.filter =" blendTrans(duration = 2) " ;;

document.images.SlideShow.style.filter =" blendTrans(duration = crossFadeDuratio

n)" ;;
第一行只会设置它为2秒,但是第二行立即用字符串crossFadeDuration覆盖值。 (因为
与变量crossFadeDuration的值相对)。

我打赌作者的意思是


document.images.SlideShow.style.filter =" blendTrans(duration =" + crossFadeDurat

ion +")" ;;
it attempts to use Microsoft''s proprietary filters (CSS extension) in
MSIE.
Using document.all it detects Explorer, then sets up changing the
image with the filters and starts it, setting up the transformation
duration parameter to the value given. If no MSIE is detected it just
flips images, disregarding all the filters part. But it seems it''s
broken.

The piece:

document.images.SlideShow.style.filter="blendTrans (duration=2)";
document.images.SlideShow.style.filter="blendTrans (duration=crossFadeDuratio
n)";
The first line would just set it to 2 seconds, but immediately the
second line overrides the value with string "crossFadeDuration" (as
opposed to value of variable crossFadeDuration).

I bet what the author meant was

document.images.SlideShow.style.filter="blendTrans (duration="+crossFadeDurat
ion+")";



谢谢你。我注释掉了似乎使过滤器

等于字符串crossFadeDuration的行。发生了什么事情现在发生了什么?b $ b现在是图像之间没有淡入淡出,它只显示一张图像3秒钟

然后突然(没有淡入淡出过渡)翻转到另一个图像3

秒等等。然后我把脚本放回到作者如何拥有它并且

注释掉了这一行

document.images.SlideShow.style.filter =" blendTrans(duration = 2 )" ;;

令我惊讶的是,它仍然有一个2秒的淡入淡出,一个图像融化

远离另一个淡入! (每个图像在屏幕上显示3秒钟)

任何想法为什么你看起来不错的答案都不能解开谜团。

感谢您的帮助

David


Thanks for that. I commented out the line that seems to make the the filter
equal to the string "crossFadeDuration" and put your line in. What happens
now is there is no fade between images, it just show one image for 3 seconds
and then suddenly (no fade transition) flips to the other image for 3
seconds and so on. I then put the script back to how the author had it and
commented out the line
document.images.SlideShow.style.filter="blendTrans (duration=2)";
and to my surprise it still has a 2 second fade between one image melting
away and the other fading in! (Each image is on screen for 3 seconds)
Any idea why your answer which looks good doesn''t solve the mystery.
Thanks for the help
David




David Graham写道:

David Graham wrote:
< bw *** *@gmail.com>在消息中写道
新闻:11 ********************** @ g44g2000cwa.googlegr oups.com ...
<bw****@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
它试图在MSIE中使用微软的专有过滤器(CSS扩展)。
使用document.all它检测资源管理器,然后设置用过滤器更改
图像并启动它,设置转换
持续时间参数到给定的值。如果没有检测到MSIE,它只是翻转图像,忽略所有过滤器部分。但似乎它被打破了。

这篇文章:

document.images.SlideShow.style.filter =" blendTrans(duration = 2) " ;;
it attempts to use Microsoft''s proprietary filters (CSS extension) in
MSIE.
Using document.all it detects Explorer, then sets up changing the
image with the filters and starts it, setting up the transformation
duration parameter to the value given. If no MSIE is detected it just
flips images, disregarding all the filters part. But it seems it''s
broken.

The piece:

document.images.SlideShow.style.filter="blendTrans (duration=2)";


document.images.SlideShow.style.filter =" blendTrans(duration = crossFadeDuratio
n)" ;;


document.images.SlideShow.style.filter="blendTrans (duration=crossFadeDuratio
n)";


第一行只是设置为2秒,但是第二行立即用字符串crossFadeDuration覆盖值。 (因为
与变量crossFadeDuration的值相对)。

我打赌作者的意思是

The first line would just set it to 2 seconds, but immediately the
second line overrides the value with string "crossFadeDuration" (as
opposed to value of variable crossFadeDuration).

I bet what the author meant was


document.images.SlideShow.style.filter =" blendTrans(duration =" + crossFadeDurat
ion +")" ;;


document.images.SlideShow.style.filter="blendTrans (duration="+crossFadeDurat
ion+")";


谢谢你。我注释掉了似乎使过滤器等于字符串crossFadeDuration的行。发生了什么。现在发生的事情是,图像之间没有淡入淡出,它只显示一个图像3秒
然后突然(没有淡入淡出过渡)翻转到另一个图像为3
秒等等。然后我把脚本放回到作者如何拥有它并且
注释掉了这一行
document.images.SlideShow.style.filter =" blendTrans(duration = 2)" ;;
令我惊讶的是,它仍然有一个2秒的淡入淡出一个图像融化
和另一个淡入! (每个图像都在屏幕上显示3秒钟)
任何想法为什么你的答案看起来不错都不能解开谜团。
感谢你的帮助
David


Thanks for that. I commented out the line that seems to make the the filter
equal to the string "crossFadeDuration" and put your line in. What happens
now is there is no fade between images, it just show one image for 3 seconds
and then suddenly (no fade transition) flips to the other image for 3
seconds and so on. I then put the script back to how the author had it and
commented out the line
document.images.SlideShow.style.filter="blendTrans (duration=2)";
and to my surprise it still has a 2 second fade between one image melting
away and the other fading in! (Each image is on screen for 3 seconds)
Any idea why your answer which looks good doesn''t solve the mystery.
Thanks for the help
David





这篇关于幻灯片问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆