script.aculo.us---Effect.Morph

This effect changes the CSS properties of an element.


Simple :

$('morph_example').morph('background:#080;color:#fff');

Complex :
new Effect.Morph('error_message',{
  style:'background:#f00; color:#fff;'+
    'border: 20px solid #f88; font-size:2em',
  duration:0.8
});


Style as a hash (keys should be javascript names, rather than CSS ones i.e. ‘backgroundColor’ rather than ‘background-color’):


Effect-specific paramters

Option Description
style the target style of your element, writing with the standard CSS syntax, or as a hash

http://wiki.script.aculo.us/scriptaculous/show/Effect.Morph

你可能感兴趣的:(JavaScript,css)