Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
一些@font-face 字体在非cleartype 设置下效果不佳(边缘变得非常不稳定)
有没有办法通过 javascript 检测到这个,如果 cleartype 关闭,我可以在 body 中添加一个现代风格的类,这样我就可以在我的 CSS 中使用它
在 IE 6+ 中,您可以检查该screen.fontSmoothingEnabled属性。否则,您需要使用 html 5 画布来检查这一点。
screen.fontSmoothingEnabled
详情在这里。