Home >Web Front-end >JS Tutorial >A simple javascript image enlargement effect code_image special effects
A simple image enlargement effect:
Parameter description:
1.berviary:String, the id of the image that needs to be enlarged
2.expand:object, the enlargement area, if this item or the id of this item is not set If not set, the default is cursor following mode, which will automatically create a div for displaying the magnified area.
3.clip:object, the size of the cropping area, that is, when the mouse moves over the picture that needs to be enlarged, the highlight needs to be Large area
4.opacity:float, the transparency of the masked area of the image when zooming in
Effect 1:
JS code called: