实现移动端点击图片放大,两指缩放 scale.js实现

DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <title>图片缩放title>
        <link rel="stylesheet" type="text/css" href="scale.css" />
        <style type="text/css">
            .list img{
                width: 200px;
                height: 200px;
            }
        style>
    head>

    <body>
        <div class="list">
            <img src="frog.jpg" />
            <img src="frog.jpg" />
        div>
        <section class="imgzoom_pack">
            <div class="imgzoom_x">Xdiv>
            <div class="imgzoom_img"><img src="" />div>
        section>
        <script src="scale.js" type="text/javascript" charset="utf-8">script>
        <script type="text/javascript">
            document.addEventListener("DOMContentLoaded", function(event) {
                ImagesZoom.init({
                    "elem": ".list"
                });
            }, false);
        script>
    body>

html>

 

转载于:https://www.cnblogs.com/150536FBB/p/10613583.html

你可能感兴趣的:(实现移动端点击图片放大,两指缩放 scale.js实现)