Home > front end >  Bosses teach me
Bosses teach me

Time:09-25

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,

CodePudding user response:

reference 1/f, the sky wave response:
is when 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

Thank you, you said this is very clear, I understand this section, there is a small problem, oul. Style. Left=oul. The offsetLeft - 2 + "px" is what meaning, hope big patience to solve, thank you enough

CodePudding user response:

reference 4 floor m0_46679975 response:
Quote: reference 1/f, the sky wave response:
is when 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

Thank you, you said this is very clear, I understand this section, there is a small problem, oul. Style. Left=oul. The offsetLeft - 2 + "px" is what meaning, hope big patience to solve, grateful

Mean resetting oul for oul the current location (offsetLeft) minus 2, because the value is so let's add px unit is the pixel

CodePudding user response:

refer to fifth floor of the sky wave response:
Quote: refer to 4th floor m0_46679975 response:

Quote: reference 1/f, the sky wave response:
is when 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

Thank you, you said this is very clear, I understand this section, there is a small problem, oul. Style. Left=oul. The offsetLeft - 2 + "px" is what meaning, hope big patience to solve, grateful

Mean resetting oul for oul the current location (offsetLeft) minus 2, because the value is so let's add px unit is the pixel

Well understand, thank you thank you bosses

CodePudding user response:

Learning, thank you

CodePudding user response:

This program can be circularly?

CodePudding user response:

Learn to learn

CodePudding user response:

Here is a link LZ can I see a mouse events and clientX offsetX, screenX, pageX, the difference between x
  • Related