pc端 前端页面 js灯箱效果能放大缩小吗

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pc端 前端页面 js灯箱效果能放大缩小吗相关的知识,希望对你有一定的参考价值。

求助 我已经实现了灯箱效果 发现不能放大和缩小 我想通过鼠标滚轮实现把灯箱图片 放大缩小的效果?或者有没有能点击图片进行预览然后可以滚动鼠标进行放大缩小的CSs或者js

可以监听滚轮事件 mousewheel 判断是点击的图片是否显示,显示的话 先屏蔽滚动事件 然后获取到你显示出来的容器 改变一下img的css的 transform :scale属性,也可以判断下滚动方向进行放大和缩小 如果没有显示 就不采取任何处理 参考技术A 可以通过鼠标滚轮滚动事件来做 参考技术B 有的,用Owl Carousel能实现你说的效果, 参考技术C <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>zoom</title>
</head>
<body>
<image id="image" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCABuAG4DAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHw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b/y1/gbdXn4bJqdXA4iM4fvaXv8A+OJ97hswhjOWpSL3xH0FPE/gHxBpjLv+0WcqJ/v7Nyf+PV89lOJ+qY6liP5Jnq1o89OcTN/4JvfECTQtQn8EXkrfYtatP7W0zd/DKnyXCf8Aju6v6zy3F+2lWpfyyPy3iLCWjDERP0Gr3j4YKACgAoAKACgAoA8Y/bA09L/9mzx7A/T+z92f911rKp8J6WWz5cZA+dvh5ObrwR4fmPBazi/9Ar+Ms2jy47ER/vyP3qn/AAzxv4PfFXxT421zRPA1/PBdWun+KX1GDU7gs1yoBcGLH3dpXeP+BV/SGWZZRoVIVsN7vuxPjqtJfWp1z6F8UfDvw9pen614jt/7S05Fha9uYNKvpbVZiqddivt3V7VShRr+9KJDVOa96JxXxs8KTaF+xn4d1S8vptR1C11W11WO4uJWmkTzHOVVm/3q+BpVKc80q0lH3eScTycLWazG8TqbiXOmTSHn9wzf+OV+CRj+85T9N+yfOvwl1CXwV4c+FXjG2b/SbDxG1tsX+KCWXayV/RGWYudLiXEUV9qMT5bMKEauBnc/WNTuWv1k/GR1AH//2Q==">

<script type="text/javascript">
var image = document.querySelector('#image');
var iw = image.width,ih = image.height,zoomSept = 5;
image.addEventListener('mousewheel',function(e)

if( e.wheelDelta >0)
this.width+=5;
this.height+=5;
else
if(this.width<iw/2)return;
this.width-=5;
this.height-=5;

,false)
</script>
</body>
</html>

Js实现放大缩小html页面整体

Js实现放大缩小html页面整体

不包含iframe的写法

  • html代码
<body>
	<div >
    	<button onclick="enlargePage()">页面放大</button>
    	<button onclick="narrowPage()">页面缩小</button>
	</div>
	<div>这里是页面内容......</div>
</body>
  • js代码
<script type="text/javascript">
    //网页放大缩小的变量,初始值为1
    var paramNumber = 1;
    //缩小页面
    function narrowPage()
    	//设置最小限制
        if(paramNumber >0.2)
            paramNumber -=0.1;
        
        //缩小body
        document.getElementsByTagName('body')[0].style.zoom=paramNumber;
    
    //放大页面
    function enlargePage()
    	//设置最大限制
        if(paramNumber <5)
            paramNumber +=0.1;
        
        //放大body
        document.getElementsByTagName('body')[0].style.zoom=paramNumber;
    
</script>

包含iframe的写法

  • html代码

主页面代码:

<body>
	<div >
    	<button onclick="enlargePage()">页面放大</button>
    	<button onclick="narrowPage()">页面缩小</button>
	</div>
	<div>这里是页面内容......</div>

	<iframe id="iframeId" src="iframe-content.html"
	 frameborder="0" style="min-height:200px;overflow:visible;"  >
	</iframe>
</body>

iframe-content.html代码:

<body>
<div>这里是iframe的内容......</div>
</body>
  • js代码
<script type="text/javascript">
    //网页放大缩小的变量,初始值为1
    var paramNumber = 1;
    //如果有iframe的话,iframe也跟随主框架大小变化
    $(function()
        //根据id获取子iframe元素
        var iframe = $("#iframeId")[0];
        //重新加载子iframe时,每次在子iframe加载完成后,设置子iframe的body
        if (iframe.attachEvent) 
            iframe.attachEvent('onload', function () 
                document.getElementById('iframeId').contentDocument
                .getElementsByTagName('body')[0].style.zoom=paramNumber ;
            )
         else 
            iframe.onload = function () 
                document.getElementById('iframeId').contentDocument
                .getElementsByTagName('body')[0].style.zoom=paramNumber ;
            
        
    );
    //缩小页面
    function narrowPage()
    	//设置最小限制
        if(paramNumber >0.2)
            paramNumber -=0.1;
        
        //缩小body
        document.getElementsByTagName('body')[0].style.zoom=paramNumber;
        
        document.getElementById('iframeId').contentDocument
        .getElementsByTagName('body')[0].style.zoom=paramNumber;
    
    //放大页面
    function enlargePage()
    	//设置最大限制
        if(paramNumber <5)
            paramNumber +=0.1;
        
        //放大body
        document.getElementsByTagName('body')[0].style.zoom=paramNumber;
        
        document.getElementById('iframeId').contentDocument
        .getElementsByTagName('body')[0].style.zoom=paramNumber;
    
</script>

以上是关于pc端 前端页面 js灯箱效果能放大缩小吗的主要内容,如果未能解决你的问题,请参考以下文章

Js实现放大缩小html页面整体

WPF 窗口放大缩小控件也跟着放大缩小最好跟网页一样,除了用Viewbox空间

纯前端实现—按钮操作字体放大缩小

纯前端实现—按钮操作字体放大缩小

PhotoView实现图片随手势的放大缩小的效果

Js实现放大缩小html页面整体