Use CSS RevealTrans Filter

xiaoxiao2021-03-06  89

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 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 value

Rectangle 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: