如何在不使用< font>标签 [英] How to add three colors of texts in a single span without using a <font> tag

查看:89
本文介绍了如何在不使用< font>标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不使用<font>标记的情况下在单个跨度中添加三种颜色的文本(详细信息为红色,输入为蓝色,此处为黄色).有可能吗?

how to add three colors of texts in a single span (details-red, Enter-blue, here-yellow) without using a <font> tag. Is that possible?

<span>Details Enter Here</span>

推荐答案

如果不使用某种3个单独的标签,您将无法做到这一点,因为您需要一个标识符或向其中添加颜色的东西.仅纯文本还不够说明符.这是显示如何与3个单独的<span>或3个单独的<div>一起使用的示例.

You can't do it without using 3 separate tags of some sort since you need an identifier or something to add the color to. Just plain text isn't enough of a specifier. Here is an example showing how to use it with either 3 separate <span> or 3 separate <div>.

JSFiddle

这篇关于如何在不使用&lt; font&gt;标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆