forked from dunizb/CodeTest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfont HTML.html
More file actions
35 lines (35 loc) · 1018 Bytes
/
font HTML.html
File metadata and controls
35 lines (35 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test</title>
<script type="text/javascript" src="js/script1.js"></script>
<style type="text/css">
@font-face {
font-family: 'icomoon';/*自定义字体名称*/
src: url('fonts/icomoon.eot?');/*字体URL*/
src: url('fonts/icomoon.eot?') format('embedded-opentype'),
url('fonts/icomoon.ttf') format('truetype'),
url('fonts/icomoon.woff') format('woff'),
url('fonts/icomoon.svg') format('svg');
font-weight: normal;/*字体粗细*/
font-style: normal;/*字体样式*/
}
.icomoon{
font-family: "icomoon";
font-style: normal;
font-weight: normal;
font-size: 64px;
/*设置抗锯齿光滑度属性*/
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>
</head>
<body>
<h1>字体图标</h1>
<i class="icomoon" style="color:red;font-size:24px;"></i>
<i class="icomoon"></i>
<i class="icomoon"></i>
</body>
</html>