如何展开我的Chrome扩展程序的弹出窗口 [英] How Can I Expand The Popup Window of My Chrome Extension

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

问题描述

>



展开当用户单击扩展按钮时弹出的窗口...



(我想将弹出窗口的大小扩展为红色区域) p>

以下是我用来显示弹出式窗口的代码:



  
< style type =text / css>
body {
min-width:1005px; / *你想要的宽度* /
max-width:100%;
position:relative;
vertical-align:middle;
}
< / style>



< iframe src =http://stackoverflow.comwidth =100%height =100%scrolling =auto>< / iframe>



height:800px;但没有运气。无法正常运作...



UPDATE:
类似问题 Chrome扩展程序,弹出窗口的高度

解决方案

Chrome扩展程序弹出式窗口的最大高度为600像素,最大宽度为800像素。在html或body元素上使用CSS更改宽度或高度只会导致滚动条(当您注意到)超过这些最大值。使用 window.resizeBy(x,y)将没有效果。



您可以隐藏滚动条CSS,但是这不会产生使页面大于Chrome强加的最大值的期望效果。



一个选项可能是在页面中使用JavaScript对话框/模态



一些对类似问题的引用:



http://groups.google.com/a/chromium。 org / group / chromium-extensions / browse_thread / thread / 9c921612e2692376



Chrome扩展程序中的最大宽度?


I want to expand the popup window which comes from when user click the extension button...

(I want to expand the size of pop-up window to red area)

Here is the code that I'm using to show pop-up;


< style type="text/css" >
body {
  min-width: 1005px; /* your desired width */
  max-width: 100%;
  position: relative;
  vertical-align:middle;
}
< /style >

< iframe src="http://stackoverflow.com" width="100%" height="100%" scrolling="auto" > < /iframe >

I tried (in body css) width: 1280px; height: 800px; -but no luck. It's not working correctly...

UPDATE: Similar question( maybe a duplicate ? ); chrome extension, popup window's height

解决方案

Chrome extension popups have a maximum height of 600px and maximum width of 800px. Changing the width or height using CSS on the html or body element will just cause scroll bars (as you have noticed) when over these maximums. Using something like window.resizeBy(x,y) will have no effect.

You can hide the scrollbars using CSS but that will not have the desired effect of making the page bigger than the maximums imposed by Chrome.

One option might be to use a JavaScript dialog/modal in the page when the browser/page action is clicked instead of using the built in popup.

Some references to similar questions:

http://groups.google.com/a/chromium.org/group/chromium-extensions/browse_thread/thread/9c921612e2692376

Incresed max width in chrome extension?

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

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