CSS hack的操作系统检测(也需要“仅PC" CSS hack) [英] Operating sytem detection for CSS hacks (aka need a "PC only" CSS hack)

查看:36
本文介绍了CSS hack的操作系统检测(也需要“仅PC" CSS hack)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不喜欢Microsoft的字体渲染.

I don't like Microsoft's font rendering.

我已经为客户端创建了一个站点,并且调试列表中最后一个未选中的框是最大的.(顺便说一下,它还不是实时"的,所以请忽略其他错误- http://baked-beans.tv/bb )

I've created a site for a client and the last unticked box on my debugging list is the biggest. (it's not 'live' yet btw so please ignore any other bugs - http://baked-beans.tv/bb)

我正在使用字体家族来导入非标准的Web字体.它在Mac上可以正常显示,但在PC的最后一腿上看起来像个病老头.

I'm using font-family to import a non standard web font. It renders fine on Mac, but it looks like sick old man on its last legs on PC.

最大的讽刺是,该字体实际上可以在Internet Explorer 8中读取.这是我第一次看到IE在任何情况下都击败了其他浏览器.但是无论如何,在PC上的FF,Chrome或Opera中,字体看起来都不太好.

The biggest irony is that the font is actually ok to read in internet explorer 8. This is the first time I've EVER seen IE beat other browsers in anything. But anyway, the font doesn't look good in FF, Chrome, or Opera, on a PC.

因此,我的解决方案是为PC用户提供不同的字体.有很多针对不同浏览器的css hacks,但针对不同的OS却没有.php OS的检测确实非常复杂.我只是在寻找诸如if(PC)这样简单的东西;否则这样做;

So my solution is to serve different fonts to PC users. There are a lot of css hacks for different browsers, but not for different OS. the php OS detections are really really complex. I'm just looking for something simple like if(PC) do this; else do that;

任何建议都会有很大帮助

Any advice would be immensely helpful

还有另一件事...只是想知道是否有一种方法可以阻止Windows在Internet上使用抗锯齿类型?它看起来如此糟糕的原因是因为它正在尝试消除锯齿,如果它只留下较差的字体,它看起来就不会那么糟糕.

Just one other thing... Just wondering if there is a way I could prevent Windows from anti-aliasing type on the Internet? The reason why it looks so bad is because it's trying to anti-alias it, maybe if it left the poor font alone it wouldn't look so bad.

推荐答案

CSS浏览器选择器可以针对不同的操作系统.:)

The CSS Browser Selector can target different OS's. :)

这篇关于CSS hack的操作系统检测(也需要“仅PC" CSS hack)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆