如何在 HTML 中将模态框定位到浏览器之外?
我想将模式框(位置:绝对)定位到浏览器之外,但我无法让它工作。
将模态框放置在辅助监视器上会很酷(当然,如果用户有的话)。
嘿,这让我很沮丧:/
I want to position a modal box (position: absolute) out of browser, but I can't get it work.
It would be cool to position modal box on secondary monitor (if user has one, of course).
Hey, this one keeps me frustrating :/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能这样做。在浏览器窗口区域之外显示内容的唯一方法是使用 Javascript window.open() 方法,但请注意,此方法可能会被用户的弹出窗口阻止程序阻止,除非它是由用户操作触发的(例如单击关联)。
You can't do this. Just about the only way to display content outside of the browser window area is with the Javascript window.open() method, though note that this method will probably be blocked by the user's popup blocker unless it's triggered by a user action (like clicking a link).