0
我需要將段落的字體更改爲特定字體,我的字體位於ttf文件中。所有內容均爲本地(下載到我的網站文件夾中)。這裏是我的代碼:如何將段落的字體更改爲特定字體CSS
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Unwritten</title>
<link rel="icon" href="cloak.png">
<style>
body {
margin-bottom: 200%;
background-image: url("site.png");
background-repeat: no-repeat;
background-size: cover;
}
#download_button {
position:absolute;
transition: .5s ease;
top: 50%;
left: 50%;
background-color: transparent;
background-repeat:no-repeat;
border: none;
cursor:pointer;
overflow: hidden;
outline:none;
font: "font.ttf";
}
</style>
</head>
<body>
<header>
<p class="buttons">This is in a font.<p>
</header>
<section>
</section>
<footer>
</footer>
</body>
.buttons {字體-family:yourFont;} – sol