javascript - Twitter 小部件仅在 HTML 上显示链接

标签 javascript html css twitter widget

我只是想将活跃的 Twitter 源嵌入到我的网站上。 我已经按照 Twitter 网站上的小部件(在设置下)执行了所有步骤,但出于某种原因,它没有在 HTML 页面上显示 350 x 350 小部件,而是显示了指向 Twitter 页面的链接。

这是我的简单代码(由 Twitter 提供)和一些屏幕截图。

有人知道我错过了什么吗?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
<a class="twitter-timeline" data-width="350" data-height="350"     href="https://twitter.com/Coltae">Tweets by Coltae</a>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8">    </script>
</body>
</html>

enter image description here

enter image description here

enter image description here

最佳答案

src 属性中的链接缺少 https:// 部分。只需添加它就可以了。

关于javascript - Twitter 小部件仅在 HTML 上显示链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39396343/

相关文章:

javascript - ng-true-value ='0' 选取错误的值

javascript - 如何在 DOM 中搜索具有特定类的项目

html - 在 CSS 中创建一个 facebook 图标

css - <td> 是否具有与其高度相同的行高?

javascript - 了解 ng-table 演示中的延迟排序示例

javascript - 动态更改特定单词的颜色

html - 如何只选择同名的第一个 div?

html - Jekyll 找不到 _layouts default.html

html - 停止使用滚动条更改 div/容器大小?

html - 网站上未定义的删除线