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