前端
柏博
这个作者很懒,什么都没留下…
展开
-
JS日期和时间戳互转
JS日期和时间戳互转原创 2022-09-22 14:30:50 · 248 阅读 · 0 评论 -
滚动定位固定样式
CSS样式,用来标注在弹窗or页面中的提交按钮、保存按钮、返回按钮等,用来定位在滚动弹窗or页面时,定位在其右侧不动的样式 .footer { position: sticky; bottom: 20px; left: 0; width: 100%; height: 55px; line-height: 0px; padding: 20px 0px; text-align: right; } ...原创 2021-02-08 16:03:13 · 148 阅读 · 0 评论 -
ES6(js)剔除数组中的元素
数组:let list = 包含N个对象的数组; 剔除数组中的元素 let list = [ {name:'ab1';age:3}, {name:'ab2';age:6}, {name:'ab3';age:7}, {name:'ab4';age:8} ] 1. 某个确定的元素,有且仅有一个 const index = list .findIndex(item => item.age === 8) if(index > -1) {arr....原创 2021-02-08 15:34:15 · 961 阅读 · 0 评论