A simple image amplification effect:
Parameter description:
1. berviary: string, the ID of the image to be enlarged
2. Expand: object. If this item is not set or the ID of this item is not set, the cursor follows mode by default. A Div used to display the enlarged area is automatically created.
3. clip: object: Specifies the size of the cropping area. When you move the cursor over the image to be enlarged, the area to be enlarged is highlighted.
4. opacity: float, transparency of the area where the image is masked when it is enlarged
Effect 1:
Called JSCode:Copy codeThe Code is as follows: $ E ({berviary: "currentpic", expand: {ID: "Expand", style :{}}, clip: {width: "50px", height: "50px"}, opacity: "0.2 "});
HTML code:Copy codeThe Code is as follows: <div>
<Div class = "img_warp" id = "img_warp">
</Div>
<Div class = "Expand" id = "Expand" style = "border: 1px solid #555; width: 400px; Height: 400px; margin:-200px auto 0 auto; overflow: hidden; "> </div>
</Div>
Demo effect:<Br/> <style type = "text/CSS">. img_warp {width: 318px; _ Height: 199px; _ overflow: hidden; Border: 1px solid # CCC; padding: 0px; margin-left: 0px; margin-top: 0px; position: absolute; top: 0px; left: 0px ;}. img_warp {position: relative; top: 0px; left: 0px;/* cursor: crosshair */}. img_warp. current {width: 318px; Height: 199px} </style> <p>
[Ctrl + A select all Note: To introduce external JS, refresh it before execution]