Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/447.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript nyroModal根据页面大小而不是浏览器大小调整大小_Javascript_Jquery_Html_Css_Nyromodal - Fatal编程技术网

Javascript nyroModal根据页面大小而不是浏览器大小调整大小

Javascript nyroModal根据页面大小而不是浏览器大小调整大小,javascript,jquery,html,css,nyromodal,Javascript,Jquery,Html,Css,Nyromodal,我有一个链接到一个用nyroModal打开的图像。除了模式窗口放置在页面中间而不是浏览器窗口中间,所有的工作都很棒。这使得只有图像的上半部分左右可见。我应该注意到图像非常大,我只是希望nyroModal根据浏览器大小调整图像大小 以下是问题的屏幕截图: 屏幕截图显示它在哪里工作得更好,但仍然存在问题: 有没有办法让nyroModal根据浏览器窗口尺寸而不是页面大小来放置窗口并调整其大小 编辑:我一直在努力解决这个问题,并记录了更多的细节。1.这个问题只存在于Firefox和Chrome中。IE的

我有一个链接到一个用nyroModal打开的图像。除了模式窗口放置在页面中间而不是浏览器窗口中间,所有的工作都很棒。这使得只有图像的上半部分左右可见。我应该注意到图像非常大,我只是希望nyroModal根据浏览器大小调整图像大小

以下是问题的屏幕截图:

屏幕截图显示它在哪里工作得更好,但仍然存在问题:

有没有办法让nyroModal根据浏览器窗口尺寸而不是页面大小来放置窗口并调整其大小

编辑:我一直在努力解决这个问题,并记录了更多的细节。1.这个问题只存在于Firefox和Chrome中。IE的最新版本绝对没有问题。 2.模态窗口似乎正好以页面总高度的50%打开。这意味着,如果页面足够长,模式窗口将完全位于视图端口之外。 3.无论图像大小如何,或者如果其中没有任何内容,窗口都会在同一位置打开

作为最后的努力,我已经给nyroModal的开发者发了电子邮件,但还没有收到任何回复

以下是我使用nyroModal的代码:

<div class="segment" 
onmouseover="document.getElementById('hypocricy').style.display = 'block';"
onmouseout="document.getElementById('hypocricy').style.display = 'none';">
    <div id="hypocricy" style="display:none;">
        <div id="thumbDescription">
        <h2>Hypocricy Sculpture</h2>
        <div class="thumbDescriptionLinks">
            <div class="thumbDescriptionLinkBox">
            <a href="projects/hypocricy/hypocricy1.jpg" class="nyroModal" rel="gal-hypocricy">zoom</a>
            <a href="zoom-images/hypocricy2.jpg" style="display:none;" class="nyroModal" rel="gal-hypocricy" ></a>
            <a href="zoom-images/hypocricy3.jpg" style="display:none;" class="nyroModal" rel="gal-hypocricy" ></a>
            </div>
            <div class="thumbDescriptionLinkBox"><a href="hypocricy-process.html">process</a></div>
        </div>
        <p>A sculpture of two intersecting heads made up of layers of bass wood.<br/><br/>
        For this, I cut many evenly spaced slices out of a 3d head model. Importing the top view of these cross sections into Illustrator allowed me to cut them out of a sheet of bass wood via laser cutter. The slices were then assembled into two separate heads using circular spacers between each slice.</p>
        </div>
    </div>
    <img src="work/school-thumbs/hypocricy.jpg" />
</div>

伪善雕塑
两个相交头部的雕塑,由几层鲈鱼木构成。

为此,我从3d头部模型中剪切了许多等距切片。将这些横截面的俯视图导入Illustrator,使我能够通过激光切割机将它们从一片鲈鱼木材上切割下来。然后在每个切片之间使用圆形垫片将切片组装成两个独立的头部


基本上有一个正方形的div,上面还有一个正方形的div,它是隐藏的。一旦你将鼠标移到较低的div上,隐藏的div就会显示出来,并且在nyroModal图像的内部有一个链接。

我解决这个问题的方法非常简单。我不再使用nyroModal,而是使用Shadowbox。

对于同样的问题,我的解决方案是使用

我需要的东西,可以在每个有自己的url的链接上使用,模式内容是位于url的页面

有了彩色盒,这很容易