不透明度 [英] opacity

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

问题描述

嘿所有,


我通过将其不透明度(使用javascript)从0更改为100

以10步为单位来动画菜单间隔10毫秒。它第一次完美运行,

问题是它完成之后一旦它再次无效。我已经检查了

并且循环肯定正在工作,这些值肯定会被设置等等,我会看到没有理由在第一次之后它停止工作。任何想法?


代码在 http: //www.photash.com/menu.html (目前仅限MSIE)


Phil

解决方案

" Phillip Parr" < no@no.com>写道:

(使用javascript)
有什么想法吗?


不要将js问题交给样式表新闻组。

(目前仅限MSIE)




注意www在这个组的名字中,我们为网络创作。


-

Spartanicus


< blockquote> Phillip Parr写道:

我正在通过将其不透明度(使用javascript)从0改为100来设置菜单动画,以10步为间隔以10步为单位。它第一次运作完美,
问题是它完成之后一旦它再次无效。我已经检查了
并且循环肯定正在工作,值肯定会被设置等等,我看不出它为什么在第一次停止工作之后。任何想法?




我不知道是什么原因导致IE第二次没有动画。但是,

添加额外的

document.getElementById(animate).style.filter =" alp ha(opacity = 100)" ;;
可能是一种解决方法:


函数fadeIn()

{

if (!opacityx){

anitimer = setInterval(" fadeIn();",10);

document.getElementById(animate).style.filter =" alp ha(opacity = 100)" ;;

}

...

}


Daniel


opacity是一个css元素,因为我知道它可能是一个css问题。

Spartanicus < me@privacy.net>在消息中写道

news:78 ******************************** @ news.spart anicus.utvinternet.ie ...

" Phillip Parr" < no@no.com>写道:

(使用javascript)


任何想法?



唐不要将问题交给样式表新闻组。

(目前仅限MSIE)



请注意www。在这个组的名字中,我们为网络创作。

-
Spartanicus



Hey all,

I''m animating a menu by changing its opacity (with javascript) from 0 to 100
in steps of 10 at 10ms intervals. It works perfectly the first time, the
problem is that after it''s done it once it doesn''t work again. I''ve checked
and the loop is definatly working, the values are definatly being set etc, I
see no reason why it stops working after the first time. Any ideas?

code is at http://www.photash.com/menu.html (currently MSIE only)

Phil

解决方案

"Phillip Parr" <no@no.com> wrote:

(with javascript) Any ideas?
Don''t crosspost js questions to a stylesheet newsgroup.
(currently MSIE only)



Note the "www" in this group''s name, we author for the web.

--
Spartanicus


Phillip Parr wrote:

I''m animating a menu by changing its opacity (with javascript) from 0 to 100
in steps of 10 at 10ms intervals. It works perfectly the first time, the
problem is that after it''s done it once it doesn''t work again. I''ve checked
and the loop is definatly working, the values are definatly being set etc, I
see no reason why it stops working after the first time. Any ideas?



I don''t know what causes IE to not animate it the second time. However,
adding an additional
document.getElementById(animate).style.filter="alp ha(opacity=100)";

in your fadeIn function, might be a workaround:

function fadeIn()
{
if(!opacityx) {
anitimer=setInterval("fadeIn();",10);
document.getElementById(animate).style.filter="alp ha(opacity=100)";
}
...
}

Daniel


opacity is a css element, for all i knew it could have been a css problem.
"Spartanicus" <me@privacy.net> wrote in message
news:78********************************@news.spart anicus.utvinternet.ie...

"Phillip Parr" <no@no.com> wrote:

(with javascript)


Any ideas?



Don''t crosspost js questions to a stylesheet newsgroup.

(currently MSIE only)



Note the "www" in this group''s name, we author for the web.

--
Spartanicus



这篇关于不透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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