Page is a set of pictures circulation move to the left, js, please the if statement inside the two sentence statement of what does it mean, and if need to move to the right picture need how to change, thank you!
CodePudding user response:
Is when the oul mobile than oul width of half hour left let oul position return to zero, Because to the left is negative, if will be left when the judge half width less than the oul of negative
CodePudding user response:
To the right is If (oul offsetLeft & gt;=0) Oul. Style. Left=(- oul. OffsetWidth/2) + "px"; Oul. Style. Left=oul. OffsetLeft + 2 + "px";
CodePudding user response:
When oul left mobile distance, more than half of the width of the oul let oul position return to zero, every 30 milliseconds mobile 2 pixels,