gpt4 book ai didi

无论操作系统如何,都可以使用的 HTML 字体?

转载 作者:太空宇宙 更新时间:2023-11-04 01:57:30 25 4
gpt4 key购买 nike

我一直在制作一个网站,但我唯一可以使用的字体是 Monospace、Arial 和默认字体(Times New Roman?)我试图找到这样的字体: enter image description here

我试过: <body style="font-family:tahoma;"> , <body style="font-family:cabin;"> ,和许多其他人,但我找不到任何可用的字体。那些起作用的看起来都一样,而且非常丑陋。您知道有哪些字体可以不受操作系统影响吗?

最佳答案

一个选项是 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 Squirrel 创建您自己的字体(Webfont 生成器)

关于无论操作系统如何,都可以使用的 HTML 字体?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42333915/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com