Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将CSS样式表应用于XULRunner中的所有页面视图_Css_Linux_Firefox_Xulrunner - Fatal编程技术网

如何将CSS样式表应用于XULRunner中的所有页面视图

如何将CSS样式表应用于XULRunner中的所有页面视图,css,linux,firefox,xulrunner,Css,Linux,Firefox,Xulrunner,我正在尝试开发一种显示设备(预计将安装在公共交通工具中),它能够在Linux平台上的无铬嵌入式浏览器中显示(或多或少固定)网页(我目前正在使用Archlinux) 在对Mozilla Firefox进行了大量尝试之后,我现在将重点放在使用以下非常简单的xul文档的小型应用程序上: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window

我正在尝试开发一种显示设备(预计将安装在公共交通工具中),它能够在Linux平台上的无铬嵌入式浏览器中显示(或多或少固定)网页(我目前正在使用Archlinux)

在对Mozilla Firefox进行了大量尝试之后,我现在将重点放在使用以下非常简单的xul文档的小型应用程序上:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="main" title="EPL Browser" width="1920" height="1080" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 <browser type="content" src="http://www.example.org//" flex="1"/>
</window>
当我使用Mozilla Firefox时,这非常简单,我只需要将它放在Firefox配置文件中的chrome/userContent.css文件中

但现在我想知道:

  • 在我的xul文档中包含我的userContent.css文件,以使其与Firefox中的工作方式相同,这有什么意义吗
  • 如果没有,是否有其他方法将相同的CSS规则(可能还有其他规则)应用到我在xul“browser”标记中定义的页面?例如,通过直接包含在xul文档中的一些其他标记

欢迎提供任何帮助。

使用
userContent.css
文件位于
nsLayoutStyleSheetCache.cpp
文件中


看起来它不是Firefox专用的,应用程序需要非安全模式,并且需要使用配置文件,否则我认为您应该能够使用这些文件。

我不确定是否非常了解您……您是不是告诉我,我可以在Firefox配置文件中设置它(意思是,在Linux上,在
$HOME/.mozilla/firefox…
目录中)与我直接使用firefox的方式相同?好的,这似乎有效。关键是找到XULRunner配置文件的实际位置。我发现实际位置已在
应用程序.ini
XULRunner启动文件中指定,并进入
[App]
部分和
配置文件下的
键,带有(在Linux上)如果没有人,则在名称前面添加一个点。因此,如果您编写
Profile=xul_custom
,则配置文件将进入
$HOME/.xul_custom
。如果缺少配置文件键,则使用
Vendor
name
键。因此,如果
Vendor=mozilla
name=firefox
,则实际进入到
$HOME/.mozilla/firefox
。。。
body {
    overflow: hidden;
}