什么是跨浏览器,跨平台的网页安全字体? [英] What are cross-browser, cross platfom web safe fonts?

查看:239
本文介绍了什么是跨浏览器,跨平台的网页安全字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使跨浏览器,跨平台和所有设备兼容的css字体堆栈? 解决方案

将被用在移动设备上,就像你可以在一台普通的电脑上使用哪种字体一样。

一个安全的方法是使用一个通用的字体系列被移动浏览器解释为向你显示相关的字体,例如

  font-family:serif; / *(例如Times)* / 
font-family:sans-serif; / *(例如Helvetica)* /
font-family:monospace; / *(例如Courier)* /


How to make cross browser, cross platform and all devices compatible css font stack?

解决方案

You cannot gaurantee the fonts that will be used on a mobile device in the same way you can gaurantee which fonts are available on a normal computer.

A safe bet is to use a generic font family that can be interpreted by the mobile browser to show you the relevant font, e.g.

font-family: serif; /* (e.g., Times) */
font-family: sans-serif; /* (e.g., Helvetica) */
font-family: monospace; /* (e.g., Courier) */

这篇关于什么是跨浏览器,跨平台的网页安全字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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