JS 循环遍历刷新
2021-05-28 本文已影响0人
_浅墨_
let flag = true
let timmer = setInterval(()=> {
if(!flag){
// console.log('end~~~');
clearInterval(timmer)
}
else {
let width = $(".markdown-body img").css('width')
// console.log(width)
if(width !==imgWidth) {
$(".markdown-body img").css("width",imgWidth);
flag = false;
}
}
},300)