摘要: ##1.什么是lazy-loading图片“懒加载”为img标签src设置统一的图片链接,而将真实链接地址装在自定义属性中。所以开始时候图片是不会加载的,我们将满足条件的图片的src重置为自定义属性便可实现延迟加载功能##2.实现方法思想其实很简单,就是当图片相对于视口的距离小于视口高度的时候就置换... 阅读全文
posted @ 2015-07-20 17:40 jeremylee 阅读(1555) 评论(0) 推荐(0)
摘要: ##aspec-ratio- 取值:value (x/y)- 接收min/max前缀:是aspect-ratio描述了输出设备目标显示区域的宽高比。该值包含两个以/分隔的正整数。代表了水平像素数(第一个值)与垂直像素数(第二个值)的比例。##device-aspect-ratio这个和aspect-... 阅读全文
posted @ 2015-07-18 14:24 jeremylee 阅读(3198) 评论(0) 推荐(0)
摘要: ##1.input框光标太长与不居中的问题如果input框height:40px 为了字体垂直居中line-height也设为40px问题来了,这样光标在刚刚focus时候是占据整个input框并且输入的时候会顶到上边框,与下边框有距离,看起来很诡异。为了解决这个问题,最好的方法就是input的he... 阅读全文
posted @ 2015-07-18 14:06 jeremylee 阅读(1213) 评论(0) 推荐(0)
摘要: ##块内或者行内图片与文字居中对齐最靠谱的方式!做图片与文字在一行的按钮时候最常用到,总结了一个靠谱的方法,终于可以完美的对齐下面给个代码首先是html: `下载云门APP`再来看css: .btnUp img{ height: 72px; } .btnUp span{ ... 阅读全文
posted @ 2015-07-06 19:26 jeremylee 阅读(1224) 评论(0) 推荐(1)
摘要: #RGBA 语法R:红色值。正整数 | 百分数G:绿色值。正整数 | 百分数B:蓝色值。正整数| 百分数A:透明度。取值0~1之间#为什么要用RGBA而不用opacity因为在项目中需要用到一个半透明的蒙版而并不想要蒙版上的字体,也就是透明层的子元素继承透明的样式,这是就需要用到rgba,方便完美的... 阅读全文
posted @ 2015-06-29 09:17 jeremylee 阅读(182) 评论(0) 推荐(0)
摘要: #有宽度的div水平居中1.左右margin设为auto即可 .center { width: 960px; margin-left: auto; margin-right: auto; }2.绝对定位 .ele { position: absolute; width: 宽度值; lef... 阅读全文
posted @ 2015-06-23 17:51 jeremylee 阅读(183) 评论(0) 推荐(0)
摘要: #CSS的选择器优先级的权重##在 Selectors Level 3 规范中,一个选择器的优先级(权重)由依次串联的a、b、c三个标记来计算1. a: ID选择器 如#header2. b: class选择器如.header 属性选择器如[title] 伪类如:link 3. c: 标签选择器... 阅读全文
posted @ 2015-06-23 14:35 jeremylee 阅读(306) 评论(0) 推荐(0)
摘要: #datatable插件DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhance... 阅读全文
posted @ 2015-06-22 16:24 jeremylee 阅读(2802) 评论(0) 推荐(0)
摘要: ##markdown语法***代码如下 //trim function trim(str) { //删除左右两端的空格 return str.replace(/(^\s*)|(\s*$)/g, ""); } function ltri... 阅读全文
posted @ 2015-06-22 15:31 jeremylee 阅读(108) 评论(0) 推荐(0)
摘要: 最初的代码:1 .container_first {2 width: 100%;3 height: 100%;4 background: url(10176581.jpg);5 background-size: cover;6 position: relati... 阅读全文
posted @ 2015-06-18 18:34 jeremylee 阅读(2366) 评论(0) 推荐(0)