推荐基础前端学习地址https://ke.qq.com/course/315961蝉壳学院

清除浮动

.clearfix:before,.clearfix:after{
content: "";
display: table;
}
.clearfix:after{
content: "";
display: block;
height:;
clear: both;
visibility: hidden;
overflow: hidden;
}
.clearfix{
   *zoom: 1;
}

缺点:ie6;7,不支持 :after;使用zoom:1;触发haslayout

网页图标

<link rel="shortcut icon" href="img/bg-timg2.jpg" type="image/x-icon" />

div居中

.wrapper {
position: absolute;
top: 50%;
left: 50%;
margin-top: -250px;//div的高度的一半
margin-left: -200px;//div的宽度的一半
width: 500px;
height: 400px;
background: #fff;
border-radius:20px;
overflow: hidden;
}

z-index: 10;//层级

//转换数组
oSpan = Array.prototype.slice.call(document.getElementsByTagName("span")), //委托绑定元素事件
oUl.addEventListener('click', function (e) {
var target = e.target;
if(target.nodeName == 'LI'){
oCard.style.left = '100%';
oActive.innerHTML = target.innerHTML;
oActive.classList.remove('active');
}
})

demo地址https://pan.baidu.com/s/1VX6zgDaud5qjjlvYgCL3eQ     提取码:r5l6

最新文章

  1. jquery打造自定义控件(原创)
  2. Swift - 多行文本输入框(UITextView)
  3. 【Session】Tomcat中Session的外置
  4. iOS开发 Masonry的简单使用
  5. webpack 代码拆分,按需加载
  6. python学习-异常处理
  7. 链表(C++语言实现)
  8. OpenJudge计算概论-分配病房
  9. iOS开发——动画总结OC篇&amp;所有常用动画总结
  10. Android 自动编译、打包生成apk文件 4 - 多渠道批量打包
  11. 最短路之Floyd算法
  12. ES6之let命令
  13. Python练手例子(13)
  14. Python-正则表达式总结版
  15. MT【304】反射路径长度比
  16. 开源词袋模型DBow3原理&amp;源码(一)整体结构
  17. 使用CocoaPods来做iOS程序的包依赖管理
  18. To zero
  19. Ngxtop-Nginx日志实时分析利器
  20. windows下python安装Numpy和Scipy模块

热门文章

  1. ionic3引用外部插件--百度地图及echart报表的使用
  2. 微信小程序wxss样式详解
  3. mysql数据库——特殊sql语句整理之修改表结构
  4. layer.js错误Uncaught TypeError: i is not a function
  5. springboot 获取控制器参数的几种方式
  6. 根据需求定制 admin
  7. PCL点云库(Point Cloud Library)简介
  8. es6 实现单链表
  9. 基于spring reactor3构建的即时通讯api。
  10. SQL Server 时间戳与时间格式互相转换