我需要一些帮助来使@font-face加载,我认为我做的一切都很正确,我也按照Font Squirrel中的说明进行了操作。这是我的代码。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MineplexStalkers</title>
<link
rel="icon"
type="image/png"
href="https://cdn.glitch.com/47ac82cf-e3bd-4de2-a01d-cce78a6c9980%2F243-2438639_mineplex-logo.png?v=1590274953985"
/>
<body>
<h2 class="h2mine">
Welcome to the MineplexStalkers official webpage. We bring to you live Mineplex statistics and game analytics.
</h2>
</body>
<style>
@font-face {
font-family: 'minecraftmedium';
src: url('9ff01213-7695-4cf6-8627-1a6f0fa2de18_9ff01213-7695-4cf6-8627-1a6f0fa2de18_minecraft_2-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
#h2{
text-align:left;
padding: 10px;
font-family:minecraftmedium;
}
</style>
我看了你的代码,有一个小错误。
你把样式放在了你的 body
它不会工作,除非它是在。head
或 body
因为大部分的HTML代码都在这里,包括样式。