html - 将 font-awsome 链接到 amp 页面
问题描述
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>Shop App</title>
<style amp-custom>
</style>
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
我是 amp 的新手,我想在我的网站中使用 font-awsome,但是当我添加链接时,它会显示错误,任何人都可以建议我如何在 amp 中添加 font-awsome 链接。
这就是我添加字体可怕链接的方式,但它不起作用并且给出验证错误任何帮助都会很棒
解决方案
将此标签添加到“head”标签中,并在您的 AMP 页面中使用它的类。(在 AMP 页面上有效)
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
有关更多详细信息,您可以通过 AMPproject.org 看到:https ://www.ampproject.org/docs/design/responsive/custom_fonts
推荐阅读
- c# - 如何使用servicelocator wpf动态创建模型的多个实例
- amazon-web-services - 尝试导出发电机数据库表并写入 csv 文件时出现 UnicodeEncodeError
- c++ - 是否可以将文件从主机操作系统复制到在 virtualbox 中运行的来宾操作系统?(不是文件夹共享)
- python-3.x - 在 Docker 容器中运行应用程序单元测试
- java - 如何在 Java 代码中创建 jdbc 请求的 Jmeter 测试
- c# - 反向执行算法的简写
- c++ - C++ DLL(可从 VBA 调用并接收 Range 数据)
- sql-server - MS SQL 作业在具有 Windows 身份验证的链接服务器上运行存储过程
- javascript - Wordpress,Divi 主题:博客模块未呈现文章图像
- java - 如果用户单击接受,任何人都可以解决如何实现循环的问题。这样我就可以在数据库中更新