争怎路由网:是一个主要分享无线路由器安装设置经验的网站,汇总WiFi常见问题的解决方法。

zepto是什么

时间:2024/4/29作者:未知来源:争怎路由网人气:

Y)?)$/i, transform, transitionProperty, transitionDuration, transitionTiming, animationName, animationDuration, animationTiming, cssReset = {} //将驼峰式的字符串转成用-分隔的小写形式,如borderWidth ==> border-width function dasherize(str) { return downcase(str.replace(/([a-z])([A-Z])/, '$1-$2')) } function downcase(str) { return str.toLowerCase() } //用于修正事件名 function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : downcase(name) } //根据浏览器的特性设置CSS属性前轻辍和事件前辍,比如浏览器内核是webkit //那么用于设置CSS属性的前辍prefix就等于'-webkit-',用来修正事件名的前辍eventPrefix就是Webkit $.each(vendors, function(vendor, event) { if (testEl.style[vendor + 'TransitionProperty'] !== undefined) { prefix = '-' + downcase(vendor) + '-' eventPrefix = event return false } }) transform = prefix + 'transform' cssReset[transitionProperty = prefix + 'transition-property'] = cssReset[transitionDuration = prefix + 'transition-duration'] = cssReset[transitionTiming = prefix + 'transition-timing-function'] = cssReset[animationName = prefix + 'animation-name'] = cssReset[animationDuration = prefix + 'animation-duration'] = cssReset[animationTiming = prefix + 'animation-timing-function'] = '' $.fx = { off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined), speeds: { _default: 400, fast: 200, slow: 600 }, cssPrefix: prefix, transitionEnd: normalizeEvent('TransitionEnd'), animationEnd: normalizeEvent('AnimationEnd') } $.fn.animate = function(properties, duration, ease, callback) { if ($.isPlainObject(duration)) ease = duration.easing, callback = duration.complete, duration = duration.duration //如果duration是数字时,表示动画持续时间,如果是字符串,则从$.fx.speeds中取出相对应的值,如果没有找到相应的值,对取默认值 if (duration) duration = (typeof duration == 'number' ? duration : ($.fx.speeds[duration]

关键词:zepto是啥




Copyright © 2012-2018 争怎路由网(http://www.zhengzen.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版