摘要: .chan-top{top: 416px;}.abs-top{ position: absolute; margin-left: -691px;}.fixed-top{ position: fixed; margin-left: -600px; top: 0;} <div class="ans-bo 阅读全文
posted @ 2018-01-22 10:39 11个条子 阅读(422) 评论(0) 推荐(0) 编辑
摘要: .chan-top{top: 416px;} <div class="ans-box chan-top" style="height: 312px; position: fixed;left: 50%;margin-left: -600px;"></div> $(window).scroll(fun 阅读全文
posted @ 2018-01-17 17:57 11个条子 阅读(192) 评论(0) 推荐(0) 编辑
摘要: <div class="btn" id="btn">btn</div> <div class="box"></div> $('body').click(function(e) { var target = $(e.target); // 如果#overlay或者#btn下面还有子元素,可使用 // 阅读全文
posted @ 2018-01-17 15:20 11个条子 阅读(155) 评论(0) 推荐(0) 编辑
摘要: /** * 点击事件 */myChart2.on('click', function (param) { var index = param.dataIndex; alert(index);}); 阅读全文
posted @ 2018-01-15 10:01 11个条子 阅读(1659) 评论(0) 推荐(0) 编辑
摘要: <div class="wapper"> <div class="section"> <h2 class="title">热门活动</h2> <div class="activity" class="movie" id="activity-slide"> <a href="javascript:vo 阅读全文
posted @ 2018-01-12 14:47 11个条子 阅读(220) 评论(0) 推荐(0) 编辑
摘要: https://easy-mock.com 阅读全文
posted @ 2018-01-03 16:33 11个条子 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 重点是this指向问题 <style> .hide{display: none;} #box div,#box1 div{display: none;} .hover{background: #fff666;} </style> <script>// window.onload = function 阅读全文
posted @ 2017-11-10 10:33 11个条子 阅读(584) 评论(0) 推荐(0) 编辑
摘要: //原型;改写对象下面公用的方法或者属性,让公用的方法或者属性在内存中只存在一份(提高性能)//原型:prototype :要写在构造函数的下面var arr =[1,2,3,4,5];var arr2 =[1,2,3,4,5,6,7];//普通对象的写法arr.sum = function () 阅读全文
posted @ 2017-11-09 15:05 11个条子 阅读(160) 评论(0) 推荐(0) 编辑
摘要: //对象的混合写法//1.构造函数function 构造函数() { this.属性}构造函数.原型.方法 = function () {};//调用var 对象1 = new 构造函数();对象1.方法();//示例function Test(name) { this.name = name;}T 阅读全文
posted @ 2017-11-09 15:03 11个条子 阅读(349) 评论(0) 推荐(0) 编辑
摘要: //工厂方式:封装函数function test(name) { var obj = new Object(); obj.name = name; obj.sayName = function () { alert(this.name); }; //抛出 return obj;}var p1 = t 阅读全文
posted @ 2017-11-09 10:47 11个条子 阅读(336) 评论(0) 推荐(0) 编辑