html - 有没有像“:”这样的东西,我应该在给一个词上色时出现?(HTML)
问题描述
我正在写一段关于水果投资的文章。为了让它有经验,我根据水果的颜色给水果词上色:
<h1> Cantaloupes </h1><br>
<p> Cantaloupes is this type of melon that can be used as a fruit, like for drinking a refresher!
They are used to make juice. It's this avocado looking fruit that has the outside as a different color.
等等。我想<script>
用里面做一个属性<style>
,所以我可以为文章中“哈密瓜”的数量着色。我怎么能<style>
在这个里面使用,如果我不能,我怎么能用它<style>
来画“哈密瓜”字?
解决方案
<p>
<span style="color: yellow">Cantaloupes</span> is a type of <span style="color: green">melon</span> that can be used...
</p>
推荐阅读
- javascript - 为什么 ReactDnD 插件在 IE 浏览器中不起作用?
- javascript - useEffect - 更新状态时防止无限循环
- amazon-web-services - nginx 日志中的未知请求
- reporting-services - 在 SSRS 中对选定的文本部分使用粗体
- google-apps-script - 历史最高脚本 - 当 A 列中的整数较大时覆盖 B 列
- python - 声音特征属性错误:'rmse'
- c# - 通过复选框更新列和多个更新
- node.js - Axios POST 请求返回附件,存储它会在 Node.js 中给出 mulformed 文件异常
- html - 如何在 Svelte 3 中具有条件属性?
- android - 删除要从 Android 键盘输入的笑脸