摘要:
上下左右居中: (不考虑弹性布局及css3属性) 1. 已知宽高的情况下: a. 绝对定位50% + 负margin 50% * 盒宽|高度,兼容性非常好(IE6) b. 绝对定位0 + margin: auto, 兼容性比较好 2. 未知宽高: a. 加个父元素包裹起来, 并设置 display: 阅读全文
摘要:
关键 var jQuery = function( selector, context ) { return new jQuery.fn.init(); } jQuery.fn = jQuery.prototype = { constructor: jQuery, name: 'hello', in 阅读全文