Nyromodal 固定位置窗口
我正在使用 nyromodal,但无法为弹出窗口提供相对于背景的固定位置。即,我已将其放置在我想要的位置,但是当调整浏览器窗口大小时,弹出窗口会相对于背景页面内容发生变化。我知道这是 nyromodal 的一个功能,但我很想将其关闭。我在文档中找不到执行此操作的函数。有人有什么想法吗?
CSS 片段:
.nyroModalCont {
position: absolute;
margin:20px 25px 25px 25px;
background:#000;
}
触发器:
echo '<a href="showimage.php?id='.$row['id'].'" class="trigger" rel="gal">';
echo '<img src="'.$this->ImageDir.$row['id'].'/thumb/'.$row['thumb'].'" border="0" />';
echo '</a>';
谢谢, 人力资源
I'm using nyromodal, and having trouble giving the pop-up window a fixed position relative to the background. I.e. I have positioned it where I want it to go, but when the browser window is resized the pop-up shifts in relation to the background page content. I understand this is a feature of nyromodal, but I'd quite like to turn it off. I can't find a function in the docs to do that. Does anyone have any ideas?
CSS snippet:
.nyroModalCont {
position: absolute;
margin:20px 25px 25px 25px;
background:#000;
}
Trigger:
echo '<a href="showimage.php?id='.$row['id'].'" class="trigger" rel="gal">';
echo '<img src="'.$this->ImageDir.$row['id'].'/thumb/'.$row['thumb'].'" border="0" />';
echo '</a>';
Thanks,
HR
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了避免在调整浏览器窗口大小后移动弹出窗口(和调整大小),您可以将
resize
函数(内部没有代码)覆盖到 nyroModal 选项中:作为替代(或添加),根据您的需要,您可以使用处理调整大小的 nyroModal 回调来更改 css 属性:
To avoid shifting (and resizing) of a pop-up after you resize the browser window, you can overwrite the
resize
function (with no code inside) into the nyroModal options:As alternative (or adding), according to your needs, you can change css properties using nyroModal callbacks that deal with resizing: