随笔分类 -  手写题

摘要:class EventEmitter { // 补全代码 constructor(){ this.events = {} } on(eventName, callback){ //一个事件上注册多个回调函数 const callbacks = this.events[eventName] || [] 阅读全文
posted @ 2022-10-26 11:09 pocoui 阅读(30) 评论(0) 推荐(0)
摘要:.box5 { justify-content: space-between; } .box5 div { display: flex; flex-direction: column; justify-content: space-between; } 注意选择器的优先级 .box5 .center 阅读全文
posted @ 2022-10-25 10:04 pocoui 阅读(37) 评论(0) 推荐(0)
摘要:通过split将字符串分割成数组 -font-size //['', 'font', 'size'] font-size //['font', 'size'] function cssStyle2DomStyle(sName) { var arr = sName.split('-').filter( 阅读全文
posted @ 2022-10-25 09:34 pocoui 阅读(25) 评论(0) 推荐(0)