Transition effect in DIV labels

Source: Internet
Author: User
When loading a new page or leaving the old page, you can use the meta tag to control the transition effect. Similarly, the DIV (or table) tag can also use the transition effect.

The script is as follows:

Function gos (o, cur ){
O. innerHTML = "content displayed here"

Str = "this is a test in the webpage transition Application ID"

If (cur = undefined ){
// Fade-in and fade-out effect
O. filters. blendTrans. duration = 2
O. filters. blendTrans. apply ()
O. innerHTML = str
O. filters. blendTrans. play ()
} Else {
// Normal effect
O. filters. revealTrans. duration = 2
O. filters. revealTrans. Transition = cur
O. filters. revealTrans. apply ()
O. innerHTML = str
O. filters. revealTrans. play ()
}

}
</Script>

Function Description:
Gos (o, cur)
The first parameter is the object for the transition effect, such as div.
The second parameter is 0-23.
When the second parameter is not input, the transition effect is fade in and out.

Add the following style to the object for the transition effect.
Style = "FILTER: revealTrans (duration = 2, transition = 1) blendTrans (duration = 2 );"
For example, <div id = "ss" style = "FILTER: revealTrans (duration = 10, transition = 1) blendTrans (duration = 10 ); "> content shown here </div>

Duration is the transition time. In revealTrans, it controls the transition time of the general transition effect, and in blendTrans, it controls the transition time of Fade-in and fade-out.
You can also control the time in the script:
O. filters. revealTrans. duration = 2
O. filters. blendTrans. duration = 2

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.