这是普通的1行
重绘布局与IE6 relative元素不跟随bug修复实例页面
回到相关文章 »代码:
CSS代码:
/*所有的头像position:relative*/
HTML代码:
<!-- 参见页面源代码 -->
JS代码:
(function() { var eleInput = document.getElementsByTagName("input"), lenInput = eleInput.length; var eleUl = document.getElementsByTagName("ul"), eleUlTarget = eleUl[eleUl.length - 1]; for (iInput=0; iInput < lenInput; iInput+=1) { eleInput[iInput].onfocus = function() { this.style.height = "40px"; if (this.getAttribute("data-fixed")) { eleUlTarget.className = eleUlTarget.className; } }; eleInput[iInput].onblur = function() { this.style.height = "auto"; if (this.getAttribute("data-fixed")) { eleUlTarget.className = eleUlTarget.className; } }; } })();