【发布时间】:2015-05-14 06:13:02
【问题描述】:
你可以在这里看到我的问题: https://www.rekuperatory.pl/ssltest/
当您使用 Firefox 打开此站点时,它无法加载 CSS。问题是,CSS 在 Chrome、IE 和 Opera 中正确加载。 FF 也可以正确读取内联样式。
通过 HTTP 访问网站时没有问题: http://www.rekuperatory.pl/ssltest/ - 它可以在包括 Firefox 在内的所有浏览器上正常加载。
问题在于仅适用于 Firefox,仅通过 HTTPS 且仅适用于单独文件中的 CSS。
我已经联系了托管服务提供商,他们说 SSL 证书一切正常,问题一定出在链接 CSS 文件上。但我不认为这是真的。直接看代码:
h1{
color: #2387ff;
font-size: 50px;
text-align: center;
background-color: #F0F8FF;
}
.hide{
display: none;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<h1>
This should be blue and centered
</h1>
<div class="hide">CSS NOT LOADED* <br/> <small>*This DIV has "display: none" rule</small>
</div>
<h2 style=" color: #499249; text-align: center; background-color: #e6ffe3;">
Header with inline style.
</h2>
</body>
</html>
【问题讨论】: