Chrome扩展程序popup.html无法正确显示 [英] Chrome Extension popup.html not display correctly anymore
问题描述
我创建了一个使用popup.html文件的页面动作扩展。它曾经完美地工作。当我点击图标时,它会显示一个只有popup.html页面的角落可见的小方块。我设置了body和html css的高度和宽度,但没有使框变大的运气。我也将css移动到了另一个名为popup.css的页面上,并添加到了popup.html头部。
有没有人遇到过这个问题?
请帮助。
HTML:
< HTML>
< head>
< script type =text / javascriptsrc =jquery.js>< / script>
< script type =text / javascriptsrc =popup_script.js>< / script>
< link href =popup.css =stylesheettype =text / css>
< / head>
< body>
< ul>
< li id =all>全部< / li>
< li id =title>名称< / li>
< li id =artist>艺术家< / li>
< li id =album>相簿< / li>
< li id =art>图稿< / li>
< / ul>
< / body>
< / html>
CSS:
body {
font-family:arial;
font-size:13pt;
保证金:0;
padding:0;
颜色:#06477D;
}
ul {
list-style-type:none;
光标:指针;
padding:0;
保证金:0;
}
li {
text-align:center;
padding:5px 20px;
}
li:hover {
background:#06477D;
颜色:白色;
}
textarea#info {
position:absolute;
最新的Chrome Canary构建,这可能是问题所在。所有我的扩展程序的弹出窗口都显示为这样。
尝试使用不同版本的Chrome?
编辑:是的,我刚刚发现了Chrome / Chromium的一些错误报告: b
$ b
https://code.google.com/p/chromium/issues/detail?id=180724
https://groups.google.com/a/chromium.org/forum /?fromgroups =#!topic / chromium-bugs / 09xiPfAfrIc
I have created a page action extension that uses a popup.html file. It used to work perfectly. When I click the icon it displays a small box with only the corner of the popup.html page visible. I set the body and html css height and width but had no luck of making the box bigger. I also moved the css onto another page called popup.css and added to the popup.html head.
Has anyone run into this issue? Please help.
HTML:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="popup_script.js"></script>
<link href="popup.css" rel="stylesheet" type="text/css">
</head>
<body>
<ul>
<li id="all">All</li>
<li id="title">Name</li>
<li id="artist">Artist</li>
<li id="album">Album</li>
<li id="art">Artwork</li>
</ul>
<textarea id="info" type="text"></textarea>
</body>
</html>
CSS:
body {
font-family: arial;
font-size: 13pt;
margin: 0;
padding: 0;
color: #06477D;
}
ul {
list-style-type: none;
cursor: pointer;
padding: 0;
margin: 0;
}
li {
text-align: center;
padding: 5px 20px;
}
li:hover {
background: #06477D;
color: white;
}
textarea#info {
position: absolute;
}
If you're running the latest Chrome Canary build, that could be the problem. All of my extension's popups are showing up like this.
Try on a different build of Chrome?
EDIT: Yeah, I just found some bug reports for Chrome/Chromium:
https://code.google.com/p/chromium/issues/detail?id=180724 https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-bugs/09xiPfAfrIc
这篇关于Chrome扩展程序popup.html无法正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!