• <small id='dMyDw'></small><noframes id='dMyDw'>

      <bdo id='dMyDw'></bdo><ul id='dMyDw'></ul>
    <tfoot id='dMyDw'></tfoot>
      1. <legend id='dMyDw'><style id='dMyDw'><dir id='dMyDw'><q id='dMyDw'></q></dir></style></legend>
        <i id='dMyDw'><tr id='dMyDw'><dt id='dMyDw'><q id='dMyDw'><span id='dMyDw'><b id='dMyDw'><form id='dMyDw'><ins id='dMyDw'></ins><ul id='dMyDw'></ul><sub id='dMyDw'></sub></form><legend id='dMyDw'></legend><bdo id='dMyDw'><pre id='dMyDw'><center id='dMyDw'></center></pre></bdo></b><th id='dMyDw'></th></span></q></dt></tr></i><div id='dMyDw'><tfoot id='dMyDw'></tfoot><dl id='dMyDw'><fieldset id='dMyDw'></fieldset></dl></div>

        带有 CSS3 和 javascript z 轴问题的缩略图悬停缩放(放大)

        时间:2023-11-29
            <bdo id='mCQbZ'></bdo><ul id='mCQbZ'></ul>

            • <i id='mCQbZ'><tr id='mCQbZ'><dt id='mCQbZ'><q id='mCQbZ'><span id='mCQbZ'><b id='mCQbZ'><form id='mCQbZ'><ins id='mCQbZ'></ins><ul id='mCQbZ'></ul><sub id='mCQbZ'></sub></form><legend id='mCQbZ'></legend><bdo id='mCQbZ'><pre id='mCQbZ'><center id='mCQbZ'></center></pre></bdo></b><th id='mCQbZ'></th></span></q></dt></tr></i><div id='mCQbZ'><tfoot id='mCQbZ'></tfoot><dl id='mCQbZ'><fieldset id='mCQbZ'></fieldset></dl></div>

                <small id='mCQbZ'></small><noframes id='mCQbZ'>

                <tfoot id='mCQbZ'></tfoot>

                • <legend id='mCQbZ'><style id='mCQbZ'><dir id='mCQbZ'><q id='mCQbZ'></q></dir></style></legend>
                    <tbody id='mCQbZ'></tbody>
                  本文介绍了带有 CSS3 和 javascript z 轴问题的缩略图悬停缩放(放大)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试构建一系列在悬停时放大的缩略图.我的初步构建通过使用 CSS3 transform:scale 和 ease-in-out 来完成放大/缩放部分.问题是它们彼此重叠,因为它们共享一个 z 轴.

                  任何人都可以帮助我在此场景中创建一个 javascript 添加,以正确地将每个缩略图定位在有意义的 z 轴上,即每个放大的图像都调整大小以位于其他图像的顶部.

                  在我的网站上进行演示: demo 更新:已解决

                  代码预览:

                  html:

                  css:

                  #main div.hover {位置:相对;z-指数:200;显示:块;-webkit-transition:所有 0.2s 缓入出局;-moz-transition:所有 0.2s 缓入出局;-o-transition:所有 0.2s 缓入缓出;-ms-transition:所有 0.2s 缓入缓出;过渡:所有 0.2s 缓入缓出;背景颜色:#297ab1;}#main div.hover:hover, #main div.hover_effect {-webkit-transform:scale(1.5, 1.5);-moz 变换:比例(1.5,1.5);-o-transform:scale(1.5, 1.5);-ms-transform:scale(1.5, 1.5);变换:规模(1.5,1.5);}

                  脚本:

                  $(document).ready(function() {$('.hover').bind('touchstart touchend', function(e) {e.preventDefault();$(this).toggleClass('hover_effect');});});

                  所以这个页面使用这个脚本来切换将 div 的比例增加到 150% 的 hover_effect 类.

                  解决方案:z-index:999

                  还有关于在没有 setTimeOut 的情况下延迟初始 mouseenter 的任何想法吗?

                  非常感谢任何建议和解决方案!

                  附言此演示使用修改后的砌体图像库版本.

                  谢谢.

                  解决方案

                  未经测试:

                  #main div.hover:hover, #main div.hover_effect {z 指数:999}

                  Im attempting to build a series of thumbnails that enlarge on hover. My preliminary build accomplishes the enlarge/zoom part by using CSS3 transform:scale and ease-in-out. The problem is that they overlap each other because they share a single z-axis.

                  Can anyone assist me in creating a javascript addition to this scenario that correctly positions each thumbnail in a z-axis that makes sense, i.e. each enlarged image resizes to be on top of each other image.

                  Demonstration on my website here: demo Updated: Solved

                  Preview of code:

                  html:

                  <div style="position: absolute;" class="item hover"> 
                   <a href="#"><img alt="two" src="img/posts.png"></a> 
                  </div>
                  

                  css:

                  #main div.hover {
                  position: relative;
                  z-index:200;
                  display: block;
                  -webkit-transition: all 0.2s ease-in-out;
                  -moz-transition: all 0.2s ease-in-out;
                  -o-transition: all 0.2s ease-in-out;
                  -ms-transition: all 0.2s ease-in-out;
                  transition: all 0.2s ease-in-out;
                  background-color: #297ab1;}
                  
                  #main div.hover:hover, #main div.hover_effect {
                  -webkit-transform:scale(1.5, 1.5);
                  -moz-transform:scale(1.5, 1.5);
                  -o-transform:scale(1.5, 1.5);
                  -ms-transform:scale(1.5, 1.5);
                  transform:scale(1.5, 1.5);}
                  

                  script:

                  $(document).ready(function() {
                      $('.hover').bind('touchstart touchend', function(e) {
                          e.preventDefault();
                          $(this).toggleClass('hover_effect');
                      });
                  });
                  

                  So this page uses this script to toggle the hover_effect class that increases the div's scale to 150%.

                  Solution: z-index:999

                  Also any ideas about putting a delay in the initial mouseenter without a setTimeOut?

                  Any suggestions and solutions are most appreciated!

                  p.s. This demo uses a modified version of masonry image gallery.

                  Thanks.

                  解决方案

                  Untested:

                  #main div.hover:hover, #main div.hover_effect {
                      z-index: 999
                  }
                  

                  这篇关于带有 CSS3 和 javascript z 轴问题的缩略图悬停缩放(放大)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                • <small id='Bs68N'></small><noframes id='Bs68N'>

                  <i id='Bs68N'><tr id='Bs68N'><dt id='Bs68N'><q id='Bs68N'><span id='Bs68N'><b id='Bs68N'><form id='Bs68N'><ins id='Bs68N'></ins><ul id='Bs68N'></ul><sub id='Bs68N'></sub></form><legend id='Bs68N'></legend><bdo id='Bs68N'><pre id='Bs68N'><center id='Bs68N'></center></pre></bdo></b><th id='Bs68N'></th></span></q></dt></tr></i><div id='Bs68N'><tfoot id='Bs68N'></tfoot><dl id='Bs68N'><fieldset id='Bs68N'></fieldset></dl></div>

                      <tbody id='Bs68N'></tbody>

                      <bdo id='Bs68N'></bdo><ul id='Bs68N'></ul>

                          <legend id='Bs68N'><style id='Bs68N'><dir id='Bs68N'><q id='Bs68N'></q></dir></style></legend>
                          <tfoot id='Bs68N'></tfoot>