作家
登录

jQuery animate效果演示

作者: 来源:www.28hudong.com 2013-03-30 02:17:58 阅读 我要评论

animate(params[,duration[,easing[,callback]]]) 用于创建自定义动画的函数。<br /> 这个函数的关键在于指定动画形式及结果样式属性对象。这个对象中每个属性都表示一个可以变化的样式属性(如“height”、“top”或“opacity”)。 注意:所有指定的属性必须用骆驼形式,比如用marginLeft代替margin-left. 而每个属性的值表示这个样式属性到多少时动画结束。如果是一个数值,样式属性就会从当前的值渐变到指定的值。如果使用的是“hide”、“show”或“toggle”这样的字符串值,则会为该属性调用默认的动画形式。 运行以后,刷新下,主要远程js文件。 FV.Zone jQuery demos... /* 初始化样式 */ div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border: 0;} h1,h2,h3,h4,h5,h6 { margin:0; padding:0;} h1 { margin: 42px 0 20px; font-size: 18px; text-align: center; } .clear { clear: both; } a { color:#000; text-decoration: none; } a:hover { color:#999; text-decoration: none; } body { margin: 0 auto; width: 960px; background: #282c2f; color: #d1d9dc; font: 12px 'Lucida Grande', Verdana, sans-serif; } #layout { margin: 0 auto; width: 280px; } .text { line-height: 22px; padding: 0 6px; color:#666; } .box h3 { font-size: 12px; padding-left: 6px; line-height: 22px; background: #99CC00 url(arrow.gif) no-repeat right -17px; font-weight:bold; color:#fff; border: 1px solid #669900; height:22px; } .arrow { background: #99CC00 url(arrow.gif) no-repeat right 5px; } .box h3 a { color:#fff; } .box h3 a:hover { color:#eee; } .box { position: relative; background: #363C41; border: 5px solid #4A5055; } .ar { line-height: 22px; position: absolute; top: 3px; right: 6px; display: block; width: 16px; height: 16px; } jQuery demos animate(params[,duration[,easing[,callback]]]) fdsfds animate(params[,duration[,easing[,callback]]]) 用于创建自定义动画的函数。 这个函数的关键在于指定动画形式及结果样式属性对象。这个对象中每个属性都表示一个可以变化的样式属性(如"height"、"top"或"opacity")。 注意:所有指定的属性必须用骆驼形式,比如用marginLeft代替margin-left. 而每个属性的值表示这个样式属性到多少时动画结束。如果是一个数值,样式属性就会从当前的值渐变到指定的值。如果使用的是"hide"、"show"或"toggle"这样的字符串值,则会为该属性调用默认的动画形式。 fdsfds 在 jQuery 1.2 中,你可以使用 em 和 % 单位。另外,在 jQuery 1.2 中,你可以通过在属性值前面指定 "+=" 或 "-=" 来让元素做相对运动。 [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

  推荐阅读

  CSS 美化表格边框为凹陷立体效果的实现方法

当然,这里仅提供一种思路,你可以灵活修改使用。 Untitled Document 脚本之家 AJAX专栏 FW专栏 FLASH专栏 此边框为默认风格 脚本之家 AJAX专栏 F>>>详细阅读


本文标题:jQuery animate效果演示

地址:http://www.17bianji.com/kaifa2/JS/28030.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)