Smart with a CSS Light filter

xiaoxiao2021-03-06  91

Author: Fengyong Yao

The Light filter can generate an effect of analog source, but use it to be implemented by calling its "method (Method)", this is to use some JavaSCRPT knowledge, although there is a little difficult, but the effect is also strange, Let's see the following effects.

Figure 1

Figure 2 Light source filter effect

Is this effect on it cool? ! When you move your mouse on the picture, the light will move! But here is just a picture, when you do it in the method I introduced below, you can try how to let the lights follow the mouse movement! In fact, this effect is not difficult to do in DW3, but this time it is not possible to use the mouse point. Then let's start doing it.

Production steps.

1. Click on the "IMGE" icon on the object panel to insert a picture;

2, with the mouse point, open the picture of the DW3, open this code, add such code to the "IMGE" tag just inserted into the picture: ID = "Lightsy" style = "Filter: light (enabled = 1)";

3, then insert a JavaScript program after the "IMGE" tag code of the source code of the web page: