Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.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
Mac上仅针对CSS的Firefox_Css_Macos_Firefox - Fatal编程技术网

Mac上仅针对CSS的Firefox

Mac上仅针对CSS的Firefox,css,macos,firefox,Css,Macos,Firefox,我的编码中有一些对齐问题。在Windows中,所有浏览器似乎都正常。但当我在Mac firefox中查看时,对齐并不完美。我可以通过稍微更改值来修复它。但它应该只适用于Mac上的Firefox 是否有任何CSS属性或用于此的内容 例如: 还有HTML <div class="notes" style="top:2px"></div><div class="search-notes">This link is used to get information ab

我的编码中有一些对齐问题。在Windows中,所有浏览器似乎都正常。但当我在Mac firefox中查看时,对齐并不完美。我可以通过稍微更改值来修复它。但它应该只适用于Mac上的Firefox

是否有任何CSS属性或用于此的内容

例如:

还有HTML

<div class="notes" style="top:2px"></div><div class="search-notes">This link is used to get information about the visitors from the google organic search. This link is used to get information about the visitors from the google organic search. This link is used to get information about the visitors from the google organic search. This link is used to get information about the visitors from the google organic search. </div>
    </div>
此链接用于从谷歌有机搜索中获取访客信息。此链接用于从谷歌有机搜索中获取有关访问者的信息。此链接用于从谷歌有机搜索中获取有关访问者的信息。此链接用于从谷歌有机搜索中获取有关访问者的信息。

您可以使用类来实现所需的功能。嗅出用户的浏览器和操作系统,并为您的特定情况向主体添加一个类。例如,如果用户在Mac上使用Firefox,则在CSS中使用
.macFirefox.yourClass{/*CSS rules*/}
macFirefox
类应用于body

但是,最好以更交叉的方式应用样式

例如,在特定情况下,将样式更改为


.search-notes {
    font-size: 14px;
    color: #484848;
    position:absolute;
    display:inline;
/*  position: relative;
    top: -20px;
    margin: 0 25px 0 22px;  */
}
我们应该做到这一点


您可以进入未记录功能查询的灰色区域。这样,您就可以只针对Mac上的Firefox:

@supports (-moz-osx-font-smoothing: auto) {
  #firefox-on-mac { display: block; }
}
如果您想针对所有Firefox,除了Mac上的Firefox,请执行以下操作:

@supports (-moz-appearance: none) and (not (-moz-osx-font-smoothing: auto)) {
  #firefox-not-on-mac { display: block; }
}
我故意不使用
@-moz文档
,因为它已被禁用以供公共使用


请参阅实际示例。

能否显示CSS和Firefox版本?制作JSFIDLE或输入代码添加代码和其他details@STiwari不客气。一定要选出对你有帮助的答案。
@supports (-moz-appearance: none) and (not (-moz-osx-font-smoothing: auto)) {
  #firefox-not-on-mac { display: block; }
}