2017-02-19 45 views
0

我一直在做一个网站,但我能得到的工作是等宽字体,宋体,默认的唯一字体(宋体?)我试图找到这样的字体: enter image description here无论操作系统如何都可以工作的HTML字体?

我尝试: <body style="font-family:tahoma;">, <body style="font-family:cabin;">, 和许多其他,但我找不到任何工作的字体。那些工作的人看起来都一样,很丑陋。你知道任何不管操作系统都可以工作的字体吗?

回答

0

为了让您的字体看起来在所有的操作系​​统一样,你会更好地使用的字体从谷歌字体 您的情况下,字体提供者,你可以在你的头中加入这一行

<link href='http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext' rel='stylesheet' type='text/css'> 

,之后尝试

<body style="font-family:Lato"> 
1

一个选项是Google Fonts,易于实现。

链路的参考列表: Google Fonts

实施例:

body { 
 
    font-family: 'Open Sans', sans-serif; 
 
}  
 
.bold { font-weight:600; } 
 

 
.bitter { font-family: 'Bitter', serif; }
<!DOCTYPE html> 
 
<html> 
 
<head> 
 
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet"> 
 
    <link href="https://fonts.googleapis.com/css?family=Bitter|Lato" rel="stylesheet"> 
 
</head> 
 
<body> 
 

 
<p>This font is <span class="bold">Open Sans</span></p> 
 
<p class="bitter">This font is <span class="bold">Bitter</span></p> 
 

 

 
</body> 
 
</html>

一种替代,将与Font Squirrelweb字体生成

相关问题