- 博客(9)
- 收藏
- 关注
原创 解析 var b = 10; (function b(){ b = 20 console.log(b) })()
var b = 10;(function b(){ b = 20 console.log(b)})()
2022-08-17 09:18:13
2900
2
原创 border-radius 使用技巧
border-radius总所周知:border-radius是设置dom元素的圆角属性,熟为人知的操作是border-radius: 1px 2px 3px 4px其中值分别代表了左上、右上、右下、左下的圆角程度有图有真相(滑稽)其还可以接收%的使用这里有个一个不为人知的小知识,border-radius可以单独指定水平和垂直半径。通过斜杠(/)分隔两个值即可。第一个值是x,第二个值是y(斜杠 / 后的值)。当border-radius值为10px / 5px 20px,其效果相
2022-05-03 09:48:12
709
原创 简单的实现instanceOf
Function.prototype.ownInstanceOf = function(instanceObj, prototypeObj) { let current = instanceObj.__proto__ while (current) { if (current === prototypeObj.prototype)return true current = current.__proto__ } return false } function Foo() {.
2021-12-13 16:23:59
220
原创 vue:@click和input: v-model 执行顺序
今天发现了一个小问题点击图片下面的复选框控制台打印的是明明选中了复选框,但是打印的内容却是false,这就有点意思了,看代码<inputtype=“checkbox”v-model=“checked[i]”name=""@click=“handleChecked”class=“checked”>明明操作没有问题,但是发现有点问题,所以就怀疑是异步,所以加上定时器即可看打印效果后两行是定时器打印总结:vue中v-model和@click执行顺序@click
2021-03-12 10:46:34
1030
转载 移动端 相册图片 不设置宽高设置1:1的盒子
设置宽度,不设置高度,盒子大小1:1可以通过padding值padding: 100%;这里的 百分比 是根据自身盒子宽度进行计算宽高所以可以通过.itemImg {width: 23%;margin: 1%;height: 0;padding-bottom: 23%;position: relative;}.itemImg>img {position: absolute;left: 0;top: 0;width: 100%;height: 100%;}
2021-03-11 15:54:49
141
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人