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 阅读全文
posted @ 2021-02-24 22:52 顺· 阅读(140) 评论(0) 推荐(0)
摘要:一、style 利用 “[元素].style.[CSS属性名] = [属性值]” 的方法 1 var Box = document.getElementById('box') 2 Box.style.height = '100px' 3 Box.style.width = '100px' 4 Box 阅读全文
posted @ 2021-02-05 16:44 顺· 阅读(2318) 评论(0) 推荐(0)
摘要:一,已知宽高 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 阅读全文
posted @ 2021-02-05 16:24 顺· 阅读(220) 评论(0) 推荐(0)