上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 23 下一页

2016年1月28日

多列布局

摘要: 目前只有ie支持http://samples.msdn.microsoft.com/iedevcenter/MultiColumn/default.html column-count 分割的列数 默认auto,可由其他属性来计算 column-width 设置每一列的宽度 默认值为auto,由其他属 阅读全文

posted @ 2016-01-28 14:45 迷茫小飞侠 阅读(181) 评论(0) 推荐(0) 编辑

通用的contain函数

摘要: 用来检测节点所属关系:document.documentElement.contains(document.body) function contains(refNode, otherNode) {if (typeof refNode.contains == “function” && (!clie 阅读全文

posted @ 2016-01-28 14:44 迷茫小飞侠 阅读(796) 评论(0) 推荐(0) 编辑

Visual formatting model 可视化格式模型

摘要: 在可视化格式模型里,每个元素都是由一个或者多个盒子组成,这些盒子的布局由下面规则控制: box dimensions and type.(块元素和行内元素) positioning scheme (normal flow, float, and absolute positioning). rela 阅读全文

posted @ 2016-01-28 14:43 迷茫小飞侠 阅读(167) 评论(0) 推荐(0) 编辑

overflow:hidden

摘要: 修复塌陷问题的核心: Floats, absolutely positioned elements, block containers (such as inline-blocks, table-cells, and table-captions) that are not block boxes, 阅读全文

posted @ 2016-01-28 14:43 迷茫小飞侠 阅读(197) 评论(0) 推荐(0) 编辑

检测一个对象方法是否存在

摘要: function isHostMethod(object, property) { var t = typeof object[property]; return t == ’function’ || (!!(t==’object’ && object[property])) || t == ’un 阅读全文

posted @ 2016-01-28 14:42 迷茫小飞侠 阅读(158) 评论(0) 推荐(0) 编辑

非堵塞 延迟脚本 高性能

摘要: 1、延迟解析 <script type="text/javascript" src="file1.js" defer></script> defer告诉解析器该脚本不会修改Dom,可以迟点再解析执行 也可以写在网页内脚本 <script defer> alert("defer"); </script 阅读全文

posted @ 2016-01-28 14:40 迷茫小飞侠 阅读(138) 评论(0) 推荐(0) 编辑

移动开发 相关 备忘

摘要: .game { position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow: hidden; } 使游戏容器绝对定位之后,上下左右四边都与手机屏幕贴紧 http://isux.tencent.com/html5-game-de 阅读全文

posted @ 2016-01-28 14:39 迷茫小飞侠 阅读(137) 评论(0) 推荐(0) 编辑

元素透明 渐变函数

摘要: var testObj = document.getElementById("你想要渐变的元素"); function setOpacity(value) { testObj.style.opacity = value/10; testObj.style.filter = 'alpha(opacit 阅读全文

posted @ 2016-01-28 14:02 迷茫小飞侠 阅读(165) 评论(0) 推荐(0) 编辑

cookie

摘要: 在头部设置cookie,所有cookie都会作为request header发送 HTTP/1.1 200 OK Content-type: text/html Set-Cookie: name=value; domain=.wrox.com; path=/; secure //secure表示只有 阅读全文

posted @ 2016-01-28 14:01 迷茫小飞侠 阅读(117) 评论(0) 推荐(0) 编辑

media query 单位

摘要: 使用em 判断的media query 在用户缩放的时候不会被破坏,使用em更加合适内容为王的页面趋势 内容的容器需要根据内容而按比例设置,就像line-height:1.14em,文字大小的1.14倍 100% = 1 em ~= 16px ~= 14pt ,这是默认浏览器baseline为16p 阅读全文

posted @ 2016-01-28 14:00 迷茫小飞侠 阅读(118) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 23 下一页

导航