02 2021 档案
摘要:类的理解 1 // 创建一个person类 2 class Person { 3 /* */ 4 // 构造器方法 5 constructor(name, age) { 6 // this指向 => 类的实例对象 7 this.name = name; 8 this.age = age; 9 } 1
阅读全文
摘要:一、style 利用 “[元素].style.[CSS属性名] = [属性值]” 的方法 1 var Box = document.getElementById('box') 2 Box.style.height = '100px' 3 Box.style.width = '100px' 4 Box
阅读全文
摘要:一,已知宽高 1 <style> 2 #box { 3 height: 400px; 4 width: 400px; 5 border: 1px solid grey; 6 position: relative; 7 } 8 .son { 9 height: 300px; 10 width: 300
阅读全文

浙公网安备 33010602011771号