我猜我需要一个 doctype,因为以下字体样式仅在 Safari 和 Chrome 中显示我想要的样式。所以每次我添加 HTML5 文档类型时,我的自定义字体都会消失。我是一名业余编码员,所以请裸露代码,我自学。
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8"/>
<style type="text/css">
#yolk {
background-image: url(Yolk.png);
background-repeat: no-repeat;
background-position: center top;
padding-top:250px;
}
body {
background-color:#000000;
}
#lol {
background-image: url(lol.png);
background-repeat: no-repeat;
background-position: center top;
padding-top: 100px;
padding-bottom: 100px;
}
@font-face {
font-family: my_font;
src: url('http://myurl.com/lolfont.eot');
src: url('lolfont.eot'), url('lolfont.ttf') format('opentype');
}
p {
font-family: my_font;
color: de0000;
text-align: left;
font-size: 50px;
line-height: 10%;
text-indent: 350px;
}
</style>
<title>yolk</title>
</head>
<body>
<div id="yolk"></div>
<center>
<embed allowScriptAccess="never" src="http://swing.awardspace.com/newcoun… width=320 height=110 wmode=transparent menu=false></embed>
</center>
<p>test</p>
<a href="http://www.google.com" title="lol"><div id="lol"></div></a>
</font>
</html>