![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
文章平均质量分 69
早晚会腾跃
此博客仅作个人平时资料收集存放,如有侵犯或错误请及时纠正
展开
-
手机自适应
自定义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 阅读 · 0 评论 -
jquery图片展开收起
jquery图片展开收起原创 2016-08-24 10:27:26 · 402 阅读 · 0 评论 -
number parseInt() parseFloat() toString valueof()
number parseInt() parseFloat() toString valueof()原创 2016-08-24 10:56:15 · 304 阅读 · 0 评论 -
属性的四大特征和函数执行过程
属性的四大特征和函数执行过程原创 2016-08-24 11:02:13 · 489 阅读 · 0 评论 -
对象/函数对象的原型
转载 2016-08-24 11:05:32 · 219 阅读 · 0 评论 -
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 阅读 · 0 评论 -
菜单下拉 jq
$("#serviceBtn").mousemove(function() { $("#subMenu").css("visibility", "visible"); }) $("#mainMenu").mouseleave(function() { $("#subMenu").css("visibility", "hidden");原创 2016-08-24 15:43:50 · 243 阅读 · 0 评论 -
回到顶部
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 阅读 · 0 评论 -
倒计时
60s倒计时 dianjihhh function countdown(objId, _time) { document.addEventListener("DOMContentLoaded", function() { var obj = document.getElementById原创 2016-08-24 19:50:55 · 164 阅读 · 0 评论 -
表单提交,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 阅读 · 0 评论 -
js图片展开收起
js图片展开收起原创 2016-08-24 10:14:53 · 553 阅读 · 0 评论 -
prototype的方法
prototype的方法原创 2016-08-24 10:04:37 · 333 阅读 · 0 评论 -
call(),apply()
call(),apply()原创 2016-08-24 09:55:50 · 112 阅读 · 0 评论 -
backtop debug
~ function() { function Back2top(config) { this.config = config; this.init(); } // 创建构造函数Back2top,在它的原型上添加init属性 Back2top.prototype.init = function() {原创 2016-08-28 10:07:40 · 342 阅读 · 0 评论 -
获取元素CSS值之getComputedStyle方法熟悉
获取元素CSS值之getComputedStyle方法熟悉转载 2016-08-24 01:57:53 · 191 阅读 · 0 评论 -
遍历
遍历原创 2016-08-24 02:03:06 · 154 阅读 · 0 评论 -
js中SetInterval与setTimeout用法
js中SetInterval与setTimeout用法转载 2016-08-24 08:32:55 · 124 阅读 · 0 评论 -
AJAX
ajax原创 2016-08-24 09:23:48 · 118 阅读 · 0 评论 -
媒体查询
媒体查询原创 2016-08-24 09:26:39 · 229 阅读 · 0 评论 -
选择器
选择器原创 2016-08-24 09:29:47 · 138 阅读 · 0 评论 -
form表单提交笔记
手机正则,jquery on同时存放多个事件,isNaN()非数值,trim()是string的去掉前后空格的方法原创 2016-08-24 09:35:35 · 131 阅读 · 0 评论 -
object
构造函数原创 2016-08-24 09:41:19 · 128 阅读 · 0 评论 -
图片轮播
思路:1.点击左右按钮移动图片,图片宽度一个视口宽度, 2.让图片做到无限循环,即在跳转到缓冲图是将其定位在其原图的位置 3.实现滑动,指定每次滑动距离,setinterva,在达到目的时clearinterval;4.实现小按钮点击时与图片的位置挂钩;原创 2016-08-24 14:16:16 · 328 阅读 · 0 评论