html - 有没有办法让我的 Google 字体代码适用于我的 HTML 代码?
问题描述
我正在尝试使用网站Neocities将字体添加到我的 HTML 代码中,当我添加字体时,我收到一个错误,提示Name entity expected. Got none.
我已尝试搜索 p 如何修复此错误,但我有没运气。这是谷歌字体给我使用的代码:<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
解决方案
那是因为链接或 src 中有一个 '&' 符号。HTML 不读取与符号等实体。您应该改用 %26 作为 & 符号。
推荐阅读
- python - 如何让 tkinter 不断更新值
- html - 如何在不运行整个应用程序的情况下设计/测试 Angular 组件?
- php - 如何在不在php中定义列名的情况下将数据插入表格单元格
- java - JavaFX - 多个网格窗格 - 只有一个正在连接,其余为空
- sigma.js - sigmaJS noverlap with large graph
- python - Unpacking a JSONField into multiple django form fields
- bash - bash shell 脚本:Zip 文件夹和上面非任何目录下的所有内容
- java - return HashMap as the result in Mybatis
- python - Python Scatterplot: Changing color based on both X and Y values
- android - How to enable Developer Options by default in android source?