我的页面内容在字体渲染之前呈现,即使我在顶部放置了字体 这是我的代码...

<!doctype html>
<html>
<head>
<title>Computer Stuffs Developer Profile</title>
<?php include_once('includes.php');?>
<link rel="stylesheet" href="css/projects.css" />
.

包含.php文件包含

<link href='http://fonts.googleapis.com/css?family=Tangerine|Indie+Flower|Kaushan+Script' rel='stylesheet' type='text/css'>
<!--[if IE]>
        <script src="js/ie_html5.js"></script>
    <![endif]-->
<link rel="icon" type="image/png" href="images/favicon.png" />
<link rel="stylesheet" href="css/universal.css" />
<link rel="stylesheet" href="css/hyperlinks.css" />
. 先前我的字体在HTML5.js下面,我现在已经将它移到顶部,我仍然面临问题..我清除了我的缓存和累了。

有帮助吗?

解决方案

我建议您缓存字体。以下是一个有关加载字体的性能的好文章,其中包含示例:

link

其他提示

您可以添加一个涵盖页面100%的等待面板,并在“就绪”事件上,您可以删除面板并显示正确呈现的页面。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top