摘要: if (!document.querySelectorAll) { document.querySelectorAll = function (selectors) { var style = document.createElement('style'), elements = [], eleme 阅读全文
posted @ 2018-04-10 13:42 南瓜壳 阅读(1160) 评论(0) 推荐(0) 编辑
摘要: $(function(){ var myNav = $(".nav>ul>li>a"),i; for(i=0;i<myNav.length;i++){ var links = myNav.eq(i).attr("href").split(".")[0]; var myURL = document.U 阅读全文
posted @ 2018-04-09 15:24 南瓜壳 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 一、事件 1-261、onmousedown定义:onmousedown事件会在鼠标按键被按下时发生 2、onmouseup定义:onmouseup事件会在鼠标按键被松开时发生 3、onmousemove定义:onmousemove事件会在鼠标指针移动时发生支持该事件的js对象:document但是 阅读全文
posted @ 2018-03-27 15:59 南瓜壳 阅读(155) 评论(0) 推荐(0) 编辑
摘要: http://www.zhangxinxu.com 张鑫旭 http://www.runoob.com/bootstrap/bootstrap-carousel-plugin.html 菜鸟 bootstraphttp://www.haodoxi.com/daohangcaidan/360.html 阅读全文
posted @ 2018-03-26 14:15 南瓜壳 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 1.在一般函数方法中使用 this 指代全局对象 1 2 3 4 5 function test(){ this.x = 1; alert(this.x); } test(); // 1 1 2 3 4 5 function test(){ this.x = 1; alert(this.x); } 阅读全文
posted @ 2018-03-24 22:26 南瓜壳 阅读(300) 评论(0) 推荐(0) 编辑
摘要: function ajax(){ var ajaxData = { type:arguments[0].type || "GET", url:arguments[0].url || "", async:arguments[0].async || "true", data:arguments[0].d 阅读全文
posted @ 2018-02-22 14:47 南瓜壳 阅读(4872) 评论(0) 推荐(1) 编辑
摘要: 1.显示/隐藏 ? 1 2 3 4 5 6 7 8 9 10 //hide() Object.prototype.hide = function(){ this.style.display="none"; return this; } //show() Object.prototype.show = 阅读全文
posted @ 2018-02-22 14:45 南瓜壳 阅读(1174) 评论(0) 推荐(0) 编辑
摘要: chrome: e.pageX——相对整个页面的坐标 e.layerX——相对当前坐标系的border左上角开始的坐标 e.offsetX——相对当前坐标系的border左上角开始的坐标 e.clientX——相对可视区域的坐标 e.x——相对可视区域的坐标 ff: e.pageX——相对整个页面的 阅读全文
posted @ 2017-12-29 11:03 南瓜壳 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 1. word-break:break-all;只对英文起作用,以字母作为换行依据2. word-wrap:break-word; 只对英文起作用,以单词作为换行依据3. white-space:pre-wrap; 只对中文起作用,强制换行4. white-space:nowrap; 强制不换行,都 阅读全文
posted @ 2017-12-22 15:47 南瓜壳 阅读(248) 评论(0) 推荐(0) 编辑
摘要: transform属性向元素应用2D或3D转换。该属性允许我们对元素进行旋转、缩放、移动或倾斜 transform属性 2D位置移动 1.translate(x,y) 定义: 基于原来的位置,沿X轴平移,长度为x,沿Y轴平移,长度为y 语法: transform:translate(x,y); 2. 阅读全文
posted @ 2017-12-14 14:38 南瓜壳 阅读(450) 评论(0) 推荐(0) 编辑