摘要: 1.Js操作css样式 Div.style.width=”100px”.在div标签内我们添加了一个style属性,并设定 了width值。这种写法会给标签带来大量的style属性,跟实际项目是不符。 我们没有让css和html分离。 所以如果是为了获取css样式 window.getCompute 阅读全文
posted @ 2018-11-13 20:45 css水 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 元素的属性 Div.attributes 是所有标签属性构成的数据集合 Div.classList 是所有class名构成的数组集合 在classList的原型链上看以看到add()和remove() (1) clientWidth/clientHeight 是我们设置的宽和高加上内边距(没有边框) 阅读全文
posted @ 2018-11-13 20:44 css水 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1.轮播图 案例 2.定时器this问题 var t=setInterval(function(){ console.log(this) },1000) 这里面的this是window Person.prototype={ fn:function(){ console.log(this) }, n: 阅读全文
posted @ 2018-11-13 20:44 css水 阅读(249) 评论(0) 推荐(0) 编辑