头尾部固定,中间自适应布局

摘要: <!DOCTYPE HTML><html><head> <meta charset="utf-8"> <title>头尾固定中间高度自适应布局</title> <style> html, body { height:100%; margin:0; padding:0 } header { width 阅读全文
posted @ 2018-11-19 15:52 刘二鹏 阅读(409) 评论(0) 推荐(0)

对本地存储的理解

摘要: 1.本地存储包括cookie, sessionStorage,localStorage三种, 2.区别: sessionStorage和localStorage两个只是本地存储,不能与浏览器进行通信; cookie 的内存比较小,大概4kb,sessionStorage和localStorage大概 阅读全文
posted @ 2018-11-19 15:36 刘二鹏 阅读(486) 评论(0) 推荐(0)

CSS实现三列布局

摘要: 1. 使用float实现三列左右固定宽高,中间自适应宽度 2. 使用opsition实现 3.flex布局实现 4. table布局 5.双飞翼,利用margin负值实现 阅读全文
posted @ 2018-11-19 15:33 刘二鹏 阅读(1994) 评论(0) 推荐(0)

移动端下拉加载

摘要: $(".wrapper").scroll(function(){ var $this =$(this), viewH =$(this).height(),//可见高度 contentH =$(this).get(0).scrollHeight,//内容高度 scrollTop =$(this).sc 阅读全文
posted @ 2018-11-19 14:05 刘二鹏 阅读(854) 评论(0) 推荐(0)

去往详情页之后定位到原来的位置

摘要: pushHistory();//监听页面回退window.addEventListener("popstate", function(e) { $(location).attr('href', './index.html?index='+index+"&parm=true");}, false);f 阅读全文
posted @ 2018-11-15 19:47 刘二鹏 阅读(214) 评论(0) 推荐(0)