img的src没有被赋值的时候 突然有了个小框框! 去掉border也没啥用
正常情况下给个css样式 opacity:0
img[src=""],img:not([src]){
opacity:0;
}
我这个图是直接给的base64 按照上面那种写法不生效
<img :src="'https://img-blog.csdnimg.cn/2022010611513774137.png' + imageSrc" class="face-img">
请求回来的图赋给 imageSrc
this.imageSrc= res.data.image
src有个默认的前缀 src=“https://img-blog.csdnimg.cn/2022010611513774137.png” 加上 就好啦~
img[src="https://img-blog.csdnimg.cn/2022010611513774137.png"],img:not([src]){
opacity:0;
}