- 博客(29)
- 收藏
- 关注
原创 backtop debug
~ function() { function Back2top(config) { this.config = config; this.init(); } // 创建构造函数Back2top,在它的原型上添加init属性 Back2top.prototype.init = function() {
2016-08-28 10:07:40
342
原创 手机自适应
自定义rem的值,取到屏幕实际宽度/10,window.devicePixelRatio是设备上物理像素var rem = document.documentElement.clientWidth * window.devicePixelRatio / 10;重置html的fontsizedocument.documentElement.style.fontSize = rem + "
2016-08-27 09:49:14
455
原创 标签/属性
实例用作文档中插图的图像: 黄浦江上的的卢浦大桥 实例被水平线分隔的标题和段落:This is header 1This is some text实例用作文档中插图的图像,带有一个标题:: 黄浦江上的的卢浦大桥 实例为表格设置合并边框模型:table { border-collapse:collapse; }可能的值值描述separate默认值。边框会被分开。不
2016-08-25 10:55:11
228
原创 表单提交,getjson
jQuery.getJSON(url,data,success(data,status,xhr)) Document .icon-chacha, .icon-gou { font-family: 'iconfont'; c
2016-08-24 20:05:59
477
原创 倒计时
60s倒计时 dianjihhh function countdown(objId, _time) { document.addEventListener("DOMContentLoaded", function() { var obj = document.getElementById
2016-08-24 19:50:55
164
原创 回到顶部
scrolltop onscroll事件,回到顶部 .wrap{width: 1190px;margin: 0 auto;}#btn{display: block;width: 40px;height: 40px;background: url(imgs/top_bg.png) no-repeat left top
2016-08-24 19:43:33
211
原创 菜单下拉 jq
$("#serviceBtn").mousemove(function() { $("#subMenu").css("visibility", "visible"); }) $("#mainMenu").mouseleave(function() { $("#subMenu").css("visibility", "hidden");
2016-08-24 15:43:50
243
原创 图片轮播
思路:1.点击左右按钮移动图片,图片宽度一个视口宽度, 2.让图片做到无限循环,即在跳转到缓冲图是将其定位在其原图的位置 3.实现滑动,指定每次滑动距离,setinterva,在达到目的时clearinterval;4.实现小按钮点击时与图片的位置挂钩;
2016-08-24 14:16:16
328
原创 top、postop、scrolltop、offsetTop、scrollHeight、offsetHeight、clientHeigh
此属性仅仅在对象的定位(position)属性被设置时可用。否则,此属性设置会被忽略。 复制代码代码如下: 测试top 上面是一个段落P包含在一个DIV内,可以看到P的top设置为-5px后,它的上边距超过了容器DIV的上边距,超过的这段距离就是设置的5px。 需要注意的是,DIV和P这一对包含元素,都需要设置position为absolute才能得到
2016-08-24 12:33:14
282
原创 number parseInt() parseFloat() toString valueof()
number parseInt() parseFloat() toString valueof()
2016-08-24 10:56:15
304
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人