如何在Safari中更改选项标记的背景和字体颜色 [英] How to change the background and font color of an option tag in safari

查看:602
本文介绍了如何在Safari中更改选项标记的背景和字体颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Frens,


我应该对多选标签的选项显示淡化效果。

为了达到这个目的,我使用了这样的东西:

document.getElementById(toTargetId).style.backgrou ndColor =" #ffiff" + FadeSteps [colorId];


其中toTargetId - 是应该具有淡化效果的选项的ID

FadeSteps [colorId]是一个具有不同的数组颜色代码表明我可以通过应用不同的颜色来显示淡化效果。


此代码在一小段时间后重复调用以减慢淡入淡出效果。

这在IE和Mozilla上工作正常,但它在Safari机器上没有产生任何影响。

任何人都可以帮助我。

提前致谢

Hello Frens,

I am supposed to show a fading effect on the options of a multiselect tag.
To achieve this i used something like this:
document.getElementById(toTargetId).style.backgrou ndColor = "#ffff" + FadeSteps[colorId];

where toTargetId -- is the id of that option which should have fading effect
FadeSteps[colorId] is an array having different color codes show that i can show a fading effect by applying different color.

This code gets called repeatedly after a small duration to slow down the fading effect.
This is working fine in IE and mozilla, but its not producing any effect in Safari on MAC machine.
Can anyone please help me.
Thanks in advance

推荐答案

这可能是特定于操作系统的问题 - 它可能无法通过设计实现。我可以在Windows上的Safari中设置选项标签的背景颜色。
This may be an OS-specific issue - it may just not be possible by design. I can set the background color of an option tag in Safari on Windows.



这可能是特定于操作系统的问题 - 它可能只是不可能通过设计。我可以在Windows上的Safari中设置选项标签的背景颜色。
This may be an OS-specific issue - it may just not be possible by design. I can set the background color of an option tag in Safari on Windows.



您好acoder,

您的意思是说无法更改MAC中的选项标签的背景颜色以进行旅行吗? ??

Hi acoder,
You mean to say that it is not possible to change the background color of the option tag in MAC for safari???



你的意思是说不可能在MAC中为safari更改选项标签的背景颜色???
You mean to say that it is not possible to change the background color of the option tag in MAC for safari???



我不知道 - 我还没有Mac测试。我原本认为Windows和Mac上的Safari会有相同的行为,但可能没有。

I don''t know - I haven''t got a Mac to test on. I would''ve thought that Safari on Windows and Mac would have the same behaviour, but maybe not.


这篇关于如何在Safari中更改选项标记的背景和字体颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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