jQuery:更改突出显示淡入淡出颜色? [英] jQuery: Change highlight fade-to color?

查看:86
本文介绍了jQuery:更改突出显示淡入淡出颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将 jQuery高亮效果淡出的颜色更改为?

Is it possible to change the color that the jQuery highlight effect fade's to?

现在它以黄色开始突出显示,然后淡化为白色然后淡出。

Right now it starts the highlight at yellow, then fades to white and then fades out.

我最终是什么用黄色突出显示背景颜色,然后淡化为透明。

I ultimately what to highlight the background color with yellow, then just fade to transparent.

推荐答案

我刚刚遇到这种行为jQuery UI 1.8.9,它似乎是一个bug。

I've just come across this behavior as well in jQuery UI 1.8.9, it seems to be a bug.

我的方法是定义我在CSS中突出显示的元素的背景颜色让它默认为透明。

The way around it for me was to define the background color of the element I was highlighting in the CSS instead of letting it default to transparent.

如果未设置背景颜色(即它是透明的),假设您没有更改突出显示颜色,那么它会将元素淡化为黄色然后白色然后淡出。

If the background color isn't set (i.e. it is transparent), assuming you haven't changed the highlight color, then it will fade the element to yellow then to white and then fade out.

但是,如果设置要突出显示的元素的背景颜色,当您突出显示该元素时,它将淡化为黄色然后淡化为元素的原始颜色。

However, if you set the background color of the element you are highlighting it will fade to yellow then to the element's original color when you highlight it.

这篇关于jQuery:更改突出显示淡入淡出颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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