如何在Chrome扩展程序中创建全屏html弹出窗口? [英] How to make a full screen html popup in Chrome Extension?

查看:230
本文介绍了如何在Chrome扩展程序中创建全屏html弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Chrome的默认popup.html大小为600 * 800.

如何产生全屏弹出窗口?

解决方案

使用screen.availWidth和screen.availHeight为window.open()中的height和width参数计算合适的大小

尽管这可能很接近,但不会对每个人都最大化或准确,尤其是如果显示了所有工具栏时. 请访问如何在javascript中显示全屏弹出窗口?

Default popup.html of Chrome is of 600 * 800 size.

How can I produce a full screen popup?

解决方案

Use screen.availWidth and screen.availHeight to calculate a suitable size for the height and width parameters in window.open()

Although this is likely to be close, it will not be maximised, nor accurate for everyone, especially if all the toolbars are shown. visit How to show fullscreen popup window in javascript?

这篇关于如何在Chrome扩展程序中创建全屏html弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆