Multi-Object Motion frame

Source: Internet
Author: User

[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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.