[Smart Club Video]
1. Compared to a single-object motion frame, a multi-object motion frame has a parameter, obj, to indicate which object is needed for movement ~
Run: click here
Issue One: The problem occurs when the mouse moves quickly across multiple div
Cause: A common counter is used
Solution: Use the timer as a property of obj, with only one timer on each obj.
Run: click here
2. In a single-object motion frame, the fade-in opacity is stored using a global variable opacity;
In the multi-object motion frame, opacity is stored as an attribute of obj to ensure that each obj's opacity is not disturbed;
Run: click here
Issue two: Problems with offset
Run: [Click here]
Reason: offsetwidth=width+border+padding;
Solution: Introducing Computed Styles
Run: [Click here]
3. In the multi-object motion frame, the attr parameter is added to indicate the properties that need to be changed when the current object is moving;
Run: [Click here]
4. Added special handling of opacity attributes
Run: [Click here]
Multi-Object Motion frame