script.aculo.us---Effect.Highlight

所谓的高亮显示就在这里了!

This effect Flashes a color as the background of an element. It is mostly used to draw attention to a part of the page that has been updated via javascript or AJAX, when the update would not otherwise be obvious.

Availability
script.aculo.us V1.0 and later.

Syntax
  
new Effect.Highlight('id_of_element', [options]);
new Effect.Highlight(element, [options]);


Effect-specific parameters
Option Description
startcolor Sets the color of first frame of the highlight the highlight.
Defaults to ”#ffff99” (light yellow)
endcolor Sets the color of the last frame of the highlight. This is best set to the background color of the highlighted element.
Defaults to ”#ffffff” (white)
restorecolor Sets the background color of the element after the highlight has finished.
Defaults to the current background-color of the highlighted element (see Note)

Notes
If the restorecolor option is not given, Effect.Highlight tries to find out the current background color of the element, which will only work reliably across browsers if the color is given with a CSS rgb triplet, like rgb(0, 255, 0).

Be aware of the synatx: this effect strictly requires a “new” in front, otherwise you will get a javascript error.

If you specify the startcolor or endcolor using short-form notation, as in #ccf, the effect will fail silently. Use the long-form, as in #ccccff.

new Effect.Highlight('my_field', {startcolor:'#ff99ff', endcolor:'#999999'})


Remember you can pass a DOM element to the element parameter..

Duration.

new Effect.Highlight(this,{duration: 0.5});



[url]http://wiki.script.aculo.us/scriptaculous/show/Effect.Highlight[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值