Resize popup.html in chrome extension

故事扮演 提交于 2021-02-07 13:23:38

问题


I have this chrome extension that shows some content in the popup.html. As the content changes at "run-time" the popup.html sizes change too, expanding where there's more content to show. The problem that I have is that the popup.html don't resize itself back according to a smaller content. How can I do that?


回答1:


Add <!DOCTYPE html> to the very beginning of the popup.html - it looks like you've forgotten to add it




回答2:


I had a pesky CSS line:

body {
  min-height: 100vh;
}

in my popup's CSS and removing it made the popup auto-resize itself again.



来源:https://stackoverflow.com/questions/9498685/resize-popup-html-in-chrome-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!