css in html refers to custom fonts to achieve custom font style effects (including cases)
- How are the codes defined for different fonts in web pages? How to quote foreign font files?
html case · The code is as follows:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>江西卓楷</title>
<link rel="stylesheet" type="text/css" href="statics/css/font.css"/>
<style type="text/css">
p{
font-family: 'JXZK';
font-size: 20px;
}
</style>
</head>
<body>
<p>我是江西卓凯</p>
</body>
</html>
font.css
All code of the file:
/*jxzk字体*/
@font-face {
font-family:'JXZK';
src: url('fonts/JXZK.ttf'); /* 江西拙楷 字体*/
}
Page effect · Screenshot shows:
The above is all about "how to css custom fonts in HTML-case articles".