Author: Fengyong Yao
The CSS ReveAltrans dynamic filter is a magical filter that produces 23 dynamic effects, which is more fond of it can be randomly drawn in 23 dynamic effects. With it to make a dynamic switch between the webpage, it is simple to be extremely convenient. You only need to insert such a line of code between
and head> in the web source code: When you enter this page, the web page will pull the picture from the middle of the middle, isn't it unique? ! The ReveAltrans filter is only two parameters. Duration: is a switching time, in seconds; Transition: is a switching method, it has 24 ways, see the following table: Switching effect Transition Parameter Value Switching effect Transition Parameter valueRectangle is randomly dissolved from large to small 0
The rectangle is expanded from the upper and downwards from the upper and downwards 13
The circle is expanded from the middle from the middle from the middle.
The circle is expanded from both sides from small to large 3.
Push up the 4th from the middle to expand 16
Push down 5 out from the upper right to the left. 17
Push 6 to the right 6 to expand from the left to the left 18
Push the left 7 to expand from the upper left to the right
Vertical shave 8 exfoliated from the left to the right 20
Horizontal blinds 9 random horizontal fine lines 21
Horizontal chessboard 10 random vertical fine lines 22
Vertical chessboard 11 randomly selects a special effect 23
Therefore, as long as you change the value of the "transition" of the Revertrans filter, you can get different web page handover effects, is it too convenient? But unfortunately, it is not as simple as an object of the ReveAltrans filter for web pages. It must be used to call its method with JavaScript to implement, which is to say that the program is handicapped. But it is not too difficult. Below I will use an example of making dynamic subtitle transformations to explain its method. Asymptamed, this example demonstrates that the JavaScript program is used to control the ReveAltrans filter to achieve subtitle and gradually fade out and gradually. Please see the following effects:
.mytrans {filter: RevealTrans (Transition = 12, DURATION = 2)}
->
Style>
2, insert a layer, let's change the layer's "Layer ID" to "Div1" (can be added directly on the layer's properties panel), and set the background of the layer and adjust the size of the layer, and put ReveAltrans filter The mirror is loaded onto the layer, then the tag code of the layer you see is like this:
Function Helparray (LEN)
{
THISLENGTH = LEN;
}
// Establish an array to store the contents of the conversion.
Helptext = new helpARRAY (5);
Helptext [0] = "RevealTrans in one document is actually very easy.";
Helptext [1] = "First, establish a" RevalTrans "filter that needs to be converted to the object's style form."
Helptext [2] = "Then, use the" Apply () "method to prevent errors,";
Helptext [3] = "Now, you can change anything you want to change,";
Helptext [4] = "Finally," Play () "method begins to conversion."
ScriptText = New Helparray (5);
VAR i = -1;
// Display conversion effect
Function Playhelp ()
{
IF (i == 4)
{I = 0;}
Else
{I ;}
Div1.filters [0] .Apply ();
Div1.innertext = helptext [i];
Div1.filters [0] .pe ();
/ / Set the time of each subtitle presentation, in milliseconds. The time here is longer than the time in the filter to ensure that you can stay for a period of time after the conversion is over.
// To see clear subtitle content. In this example, the subtitle demonstration is 6 seconds, and the conversion time set in the filter is 2 seconds.
Mytimeout = setTimeout ("Playhelp ()", 6000);
}
->
Script>
4, add such a code in
in the source code of the web page: οnlοad = "Playhelp ()".At this point, you can follow the F12 effect, it is not too difficult. If you want to see other conversion effects, just change the transition parameter value in the ReveAltrans filter, you don't have to change anything else, you are more convenient! Use it to make an advertisement bar, I think the effect is not bad. It's much more thin than animation.