为什么这个 Google 字体不起作用?
Why isn't this Google font working?
我的标签上有这一行,并且在 Apache 下的 Debian 服务器上正常工作,但是当我将它上传到我的生产服务器(也有 Apache 的 Debian)时,我无法获得 Open Sans Condensed 字体。
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700,300,300italic' rel='stylesheet' type='text/css'>
这是全部:
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title> XLS and CSV Conversor</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name=viewport content="width=device-width, initial-scale=1.0, minimum-scale=0.5 maximum-scale=1.0">
<meta name="viewport" content="target-densitydpi=device-dpi">
<meta name="description" content="Conversor CSV">
<meta name="keywords" content="conversor CSV, conversor, CSV">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<script src="style/sweet_alert/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="style/sweet_alert/sweetalert.css">
<script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/progressbar.js"></script>
<script type="text/javascript" src="js/textareascript.js"></script>
<script type="text/javascript" src="js/modernizr.custom.04022.js"></script>
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700,300,300italic' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
<style>
.content{
height: auto;
margin: 0;
}
.content div {
position: relative;
}
</style>
<![endif]-->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
谁能告诉我为什么?谢谢。
如果您使用的是 SSL,您将无法调用 Google 字体的非加密版本。要修复,请在您的 HTML 页面(或模板)上找到此行:
<link href='http://fonts.googleapis.com/css?family=Whatever:400,600' rel='stylesheet' type='text/css'>
并将其更改为:
<link href='//fonts.googleapis.com/css?family=Whatever:400,600' rel='stylesheet' type='text/css'>
这将允许浏览器选择合适的页面。
我的标签上有这一行,并且在 Apache 下的 Debian 服务器上正常工作,但是当我将它上传到我的生产服务器(也有 Apache 的 Debian)时,我无法获得 Open Sans Condensed 字体。
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700,300,300italic' rel='stylesheet' type='text/css'>
这是全部:
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title> XLS and CSV Conversor</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name=viewport content="width=device-width, initial-scale=1.0, minimum-scale=0.5 maximum-scale=1.0">
<meta name="viewport" content="target-densitydpi=device-dpi">
<meta name="description" content="Conversor CSV">
<meta name="keywords" content="conversor CSV, conversor, CSV">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<script src="style/sweet_alert/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="style/sweet_alert/sweetalert.css">
<script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/progressbar.js"></script>
<script type="text/javascript" src="js/textareascript.js"></script>
<script type="text/javascript" src="js/modernizr.custom.04022.js"></script>
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700,300,300italic' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
<style>
.content{
height: auto;
margin: 0;
}
.content div {
position: relative;
}
</style>
<![endif]-->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
谁能告诉我为什么?谢谢。
如果您使用的是 SSL,您将无法调用 Google 字体的非加密版本。要修复,请在您的 HTML 页面(或模板)上找到此行:
<link href='http://fonts.googleapis.com/css?family=Whatever:400,600' rel='stylesheet' type='text/css'>
并将其更改为:
<link href='//fonts.googleapis.com/css?family=Whatever:400,600' rel='stylesheet' type='text/css'>
这将允许浏览器选择合适的页面。