2

How do I make this Stylish code apply to only the domain plus.google.com in Firefox?

In Chrome, the Stylish extension allows you to specify for what domain a style should apply - but the Stylish extension for Firefox doesn't let you specify that as part of the extension.

I tried using @-moz-document rules as described on this page, but that didn't seem to work.

Here's the code that I used - it is (despite my attempts) not specific to the plus.google.com domain:

@-moz-document  url-prefix(https://plus.google.com),
            domain(plus.google.com)
{
#contentPane > div {
text-align: center !important;
}

... ...

}

Please help?

4

3 回答 3

3

编辑:也许你需要添加命名空间?

@namespace url(http://www.w3.org/1999/xhtml);  
@-moz-document domain('example.com')
{

}
于 2012-05-11T09:31:26.243 回答
0

我有同样的问题,对我来说这是括号的语法错误。如果您单击时尚编辑器中的“预览”按钮,它会告诉您是否有任何错误。HTH。

于 2014-03-01T04:33:57.550 回答
0

我在 Firefox 中使用 Stylish 将 Reddit.com 的默认拇指大小从 70 像素增加到 140 像素。

第一行告诉 Firefox 在特定网站上设置规则。

注意:不要忘记在第一行的末尾添加 { 并在脚本的最后添加 }。

@-moz-document domain("reddit.com") {
.thumbnail {
  width:auto;
  min-height:70px;
  max-height:none !important;}
.thumbnail img {
  width:140px;
  height:auto;
  border-radius: 0;}
a.thumbnail {
  width:auto;
  min-height:70px;}
a.thumbnail img{
  border-radius: 0;}
}
于 2015-09-22T23:50:17.270 回答