Home > front end >  Js operation transition
Js operation transition

Time:12-12

Var list=document. GetElementById (" list ");
Var divs=list. GetElementsByTagName (" div ");
Var BTN=document. GetElementById (" BTN ");
BTN. Onclick=function () {
for(var i=0; i divs [I]. Style. The transition="1 s" + (I * 0.5) + "s";
//divs [I]. Style. The transition="1 s" + "\ xa0" + (I * 0.5) + "s";
Divs [I]. Style. The transform="rotateX (0)";
The console. The log (" 1 s "+ (I * 0.5) +" s ");
The console. The log (" 1 s "+" \ xa0 "+ (I * 0.5) +" s ");
}
};


Resolved to make the along while sand

Divs [I]. Style. The transition= "1 s" + (I * 0.5) + "s"; Add Spaces without \ xa0 here

CodePudding user response:

CodePudding user response:

CodePudding user response:

Divs [I]. Style. The transition="1 s" + (I * 0.5) + "s"; Invalid
Divs [I]. Style. The transition="1 s" + "\ xa0" + (I * 0.5) + "s"; Invalid
Divs [I]. Style. The transition="1 s"; What is the matter can be excuse me

CodePudding user response:

1 s add a space behind
Divs [I]. Style. The transition="1 s" + (I * 0.5) + "s";

  • Related