在Google Chrome中创建面板 [英] Creating a panel in Google Chrome
问题描述
我知道Chrome允许您将脚本插入页面。如何使用脚本插入方式将窗格添加到窗口底部,而不会改变布局?
感谢。
Chrome API不提供任何帮助有了这个。您需要通过内容脚本手动插入和定位面板div。
如何设置样式:
position:fixed; bottom:0;
margin-bottom
页面正文等于面板高度
底部的绝对定位元素
value设置并通过面板高度减小。
I'm moving a plugin from Firefox to Chrome. In Firefox its possible to create a separate panel attached to the current window instead of the popup you get in chrome.
I know Chrome allows you to insert scripts into a page. How would I add a panel to the bottom of the window using script insertion in a way that doesn't alter the layout?
Thanks.
Chrome API doesn't provide any help with this. You would need to insert and position the panel div manually through content script.
How to do style it:
- Set
position:fixed;bottom:0;
for the panel - Set
margin-bottom
of the page body equal to panel height - Look for absolutely positioned elements on the page that have
bottom
value set and decrease it by panel height.
这篇关于在Google Chrome中创建面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!