zer0fire
zer0fire
[Demo](https://jsbin.com/naharoj/edit?html,css,output) ```html CSS18 .img-list { list-style: none; margin: 0; padding: 0; transform-style: preserve-3d; } li.img-container { display: inline-block; margin: 0; padding: 0; } li.img-container:nth-child(1){ transform: translateX(60px) translateZ(-21px) scale(0.75); } li.img-container:nth-child(2){...
```js function resizeImg() { var imgList = document.querySelectorAll('img') imgList.forEach(img => { if(img.attributes.width.value) { img.style.width = img.attributes.width.value } }) } resizeImg() ```
看了下 @ livetune 大佬的实现,才发现自己根本没理解题意。思考了很久并没有想到别的解法,只能模仿一下大佬了,原理就是利用一个元素占位,当宽度缩小时脱离占位的位置 [Demo](https://jsbin.com/qitiquf/13/edit?html,css,output) ```html JS Bin 2020年4月-6月 2020年1月-3月 2020 年度 OKR ``` ```css .date-picker-wrapper { display: flex; align-items: center; height: 30px; overflow: hidden; } .date-picker-col-wrapper { display: flex;...
```js const epsEqu = (a, b) => Math.abs(a - b) < Number.EPSILON ``` 顺便说还有一个现象,当有如下代码的时候 ```js Math.abs(1.1+1.3-2.4)
一开始没看懂题意,不过看懂题意之后也一脸懵比 楼上大佬就硬算出来可太秀了,我觉得我算到真的头秃了也算不出来…… 所以最后借助了一个几何作图工具,画出多边形并标出坐标,应该勉强算是符合题意吧。作图工具 [Geogebra](https://www.geogebra.org/classic#geometry) [Demo](https://output.jsbin.com/hufedetiri/1) ```html JS Bin 替换 替换素材让视频与众不同 ``` ```css div { display: none; max-width: 200px; padding: 10px; padding-top: 16px; color: white; background:linear-gradient(45deg, red, pink); clip-path: polygon(2px 39px,7px...
利用 `Object.fromEntries` 和 `Array.flat` 的方式,缺点是把 `Number` 变成 `String` 了 ```js let ary = [1, 'a', 123, '巴啦啦', 3, 'hi~', 66, 'anyString'] let entries= [] for(let i = 0; i <...
```js function getValue(data) { var result = [] data.forEach(it => { if(!result.includes(it.value)) { result.push(it.value) } }) } return result ```
《历经 xx 天,我做了一个 xxx》函数模板