我想为我的页面添加一个特定的样式,但只在运行在PC上的Firefox上.我用这个代码只针对mac,但是windows会等同于什么?有没有办法用媒体查询而不是javascript来做到这一点?
var FF = !(window.mozInnerScreenX == null);
if(FF) {
if(navigator.platform.indexOf('Mac')>=0)
{
// is a mac and on firefox
}
Run Code Online (Sandbox Code Playgroud)
用于Firefox的Css hack
@-moz-document url-prefix() {
.cssSelector {
font-size: 14px;
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5919 次 |
最近记录: |