clientX和clientY为可视区鼠标的位置。1. 随鼠标移动的div块[runjs]当document有多个页面时,会出现问题。[runjs]2. 解决方案:scrollTop, scrollLeft需要注意scrollTop/scrollLeft的兼容性获取;scrollTop = docu...
分类:
其他好文 时间:
2015-06-08 16:52:28
阅读次数:
106
1. 右侧底部悬浮框运行效果图: [http://runjs.cn/code/zvjocat0]要点:oDiv.style.top=document.documentElement.clientHeight-oDiv.offsetHeight+scrollTop;2. 右侧中部悬浮框运行效果图:[h...
分类:
其他好文 时间:
2015-06-06 11:48:01
阅读次数:
88
http://bbs.zhinengshe.com/thread-1195-1-1.html要求:速度逐渐变慢,直到停止。运行效果:[http://runjs.cn/code/wju7kucq]问题:物体无法运动到准确的位置[http://runjs.cn/code/i5cbxnxn]原因:像素不能...
分类:
其他好文 时间:
2015-06-04 13:45:18
阅读次数:
120
前篇:[运动基础 学习笔记]示例一:“分享到”运行效果:[http://runjs.cn/detail/xqyf5jlo]实例二:“淡入淡出”运行效果:[http://runjs.cn/detail/lbomhqln]
分类:
其他好文 时间:
2015-06-04 13:41:25
阅读次数:
83
http://bbs.zhinengshe.com/thread-1194-1-1.html运行效果:[http://runjs.cn/code/riwpoev9]问题1:不会在特定的位置停止 ~解决方案:添加if判断条件,达到特定位置时关闭定时器 ;运行效果:[http://runjs.cn/co...
分类:
其他好文 时间:
2015-06-04 13:39:38
阅读次数:
104
http://runjs.cn/detail/tyx8dbag//shakenum:抖动的次数,shakeDistance:抖动的距离jQuery.fn.Shake = function (shakenum , shakeDistance) { this.each(function () { ...
分类:
Web程序 时间:
2015-06-03 13:30:17
阅读次数:
122
参考:http://www.dyn4j.org/2010/05/epa-expanding-polytope-algorithm/一个在线演示:http://sandbox.runjs.cn/show/xseojpfaGJK可以判断两个凸图形是否重叠, EPA可以基于GJK的工作找出分离两个图形的最...
分类:
其他好文 时间:
2015-05-01 16:03:35
阅读次数:
163
有选择性的重复造一些轮子,未必是件坏事。Aaron的博客上加了一个悬浮菜单,貌似显得很高大上了。虽然这类小把戏也不是头一次见了,但是从未自己写过。今天就选择性的拿这个功能写一写。下面是这个轮子的开发过程,也可以当作是一篇需求文档的分析和实现过程。演示地址:http://sandbox.runjs.c...
分类:
Web程序 时间:
2015-04-27 18:15:22
阅读次数:
180
利用CSS3的伪类元素hover以及transform,transition等动画属性,可以做出一些炫酷的动画效果。下面将一些项目中使用到的示例发布出来,供大家一起学习研究。演示地址:runjs。浏览器兼容:Chrome,Safari,IE10及以上,IE9不支持渐变效果,IE8以下不支持。tra....
分类:
Web程序 时间:
2015-04-15 16:30:28
阅读次数:
2427
学习Web开发技术的16个最佳教程网站和博客:http://bbs.html5cn.org/thread-8886-1-1.html在线编辑器:http://jsbin.com/ http://runjs.cn/可用的谷歌搜索网址:https://github.com/greatfire/wiki....
分类:
其他好文 时间:
2015-04-12 19:18:46
阅读次数:
150