gpt4 book ai didi

html - 我无法将谷歌字体和天气小部件添加到 Github 页面

转载 作者:太空宇宙 更新时间:2023-11-03 18:13:16 24 4
gpt4 key购买 nike

我是网络开发的新手,我刚刚在 github 页面上放了一个非常简单的页面,here .这是一个我必须为类(class)制作的简单网站。我什至不必构建一个(可以使用 wix 等)但决定挑战自己。不是最好的设计,但足以满足我的需求。但是,我有两个主要问题:尽管从硬盘打开 html 时工作正常,但我没有加载任何包含的 Google 字体。这是一个 html 片段:

<!-- Google fonts, Lato, Arvo, Josefin Slab (semi-bold), Open Sans -->
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Arvo' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Josefin+Slab:600' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Oswald:400,700,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>

我的其余样式工作正常,所以我认为它与我的自定义样式表无关。其次,我的教授还要求我添加一个自动更新的小部件(不要问我为什么)。我有一个天气小部件,它应该显示在 div 的底部,当我打开我硬盘上的这个页面版本时,它会显示,但不在 github 页面上。 div 的代码片段:

<div class="container">
<a href="http://www.accuweather.com/en/us/purchase-ny/10577/weather-forecast/2171128" class="aw-widget-legal">
<!--
By accessing and/or using this code snippet, you agree to AccuWeather’s terms and conditions (in English) which can be found at http://www.accuweather.com/en/free-weather-widgets/terms and AccuWeather’s Privacy Statement (in English) which can be found at http://www.accuweather.com/en/privacy.
-->
</a><div id="awcc1398306407704" class="aw-widget-current" data-locationkey="" data-unit="f" data-language="en-us" data-useip="true" data-uid="awcc1398306407704"></div><script type="text/javascript" src="http://oap.accuweather.com/launch.js"></script>
</div>

这是 link to the repo .任何建议将不胜感激。谢谢!

最佳答案

[已阻止] 位于“https://mrfundira.github.io/”的页面' 已通过 HTTPS 加载,但运行来自 ' http://fonts.googleapis.com/css?family=Arvo 的不安全内容':此内容也应通过 HTTPS 加载。

这是控制台(开发工具)命令>选项>i中的错误

其他一些东西也没有正确加载/看起来像 jQuery - 这可能是您的小部件问题。

关于html - 我无法将谷歌字体和天气小部件添加到 Github 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23282971/

24 4 0
文章推荐: javascript - 固定位置不适用于 ios 设备
文章推荐: C# 公共(public)静态方法 - 在用户之间共享信息
文章推荐: html -
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com