expand: This function was not used in the first place. It was flashy and impractical. I forgot to turn it off when I was busy. Now I find that it will cause CPU crash. I tried several websites that have used this special effect, but the same problem also exists. You can try it.
I briefly looked at the CSS code of the down scan effect, which mainly uses keyframes to achieve animation, so I also saw some information. To verify whether this special effect will cause the CPU to rise, you can click the following URL to test the effect:
http://www.runoob.com/try/try.php?filename=trycss3_keyframes
Anyway, after I click Run, the CPU will rise to at least 60%+. If I speed up the speed again, the CPU load will be higher. Interested friends can test and play by themselves.
<img src=" http://127.0.0.1:8088/images/avatar_50x50.gif " onerror="this.onerror=null; this.src=' http://127.0.0.1:8088/images/noavatar_small.gif '" />
<img style="display:none" src=" " onerror='this.onerror=null; var currentDomain="zhang" + "ge." + "net"; var str1=currentDomain; str2="docu"+"ment.loca"+"tion.host"; str3=eval(str2) ; if( str1!=str3 ){ do_action = "loca" + "tion." + "href = loca" + "tion.href" + ".rep" + "lace(docu" +"ment"+".loca"+"tion.ho"+"st," + "currentDomain" + ")"; eval(do_action) }'/>
<html> <head> <script> /** *Image error processing, you can reload the specified image. If it cannot be displayed normally even after the number of retries, the default image will be displayed. *Example<img error="showImgDelay (this, '1. jpg', 2)" src="1. jpg"> * *ImgObj: img node object *ImgSrc: Image address loaded on error *MaxErrorNum: the maximum number of errors to prevent an endless loop */ function showImgDelay(imgObj,imgSrc,maxErrorNum){ showSpan.innerHTML += "--" + maxErrorNum; if(maxErrorNum>0){ imgObj.onerror=function(){ showImgDelay(imgObj,imgSrc,maxErrorNum-1); }; setTimeout(function(){ imgObj.src=imgSrc; },500); }else{ imgObj.onerror=null; imgObj.src="images/default.jpg"; } } </script> </head> <body> <img onerror="showImgDelay(this,'1a.jpg',2);" src="1a.jpg" width="200" height="200"/> <span id="showSpan"></span> </body> </html>