使用rem是为了界面响应不同尺寸的手机,引入下面的方法就可以使用rem了. setFontSize: function (doc, win) { var docEl = doc.documentElement var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize' var reCaculate = function () { var clientWidth = docEl.clientWidth
//鼠标移入移出动画 解决页面闪屏问题 window.onload = function () { var el = document.createElement('div'); el.className = "bg"; var obj_lis = document.getElementsByTagName('a'); for (i = 0; i < obj_lis.length; i++) { obj_lis[i].onmouseover = function (ev) { v
function insert(){ var tarDiv = document.getElementById("aId"); var newDiv = document.createElement("div"); newDiv.innerHTML = "insert"; newDiv.id = "insert"; oInsert.insertAfter(newDiv, tarDiv); } var oInsert = { i