如何获得多色占位符文本?



长话短说,这是我的占位符文本:

<textarea id="colour" type="text" rows="9" name="message" placeholder="Hi, I'm the next star architect! Here's my work before ever studying for a RIBA1, I first got inspired into doing architecture playing Sims 4 and I instantly had to download Architecture software to build a house. My first project is my Mesuem/Art gallery and I grown massively in that first project. Please look though every project, especially the ones with the star. ... ...Also type here and hit send if you want to email me." ></textarea>

Hi=如何在不使用span标签的情况下将' Hi '部分设置为绿色或'sims 4'部分设置为黄色,

这是可能的????

多谢

不工作

不,目前还不可能,而且使用占位符文本来保存重要信息也不是最佳实践。最好将您的信息放在输入字段周围或标签中,按照您希望的样式,并使占位符文本保持简短和描述性。请记住,不是每个人都能看到你的占位符文本,屏幕阅读器通常不会显示它。

如果您想了解更多关于占位符文本和可访问性的信息,请参阅WCAG https://www.w3.org/WAI/tutorials/forms/instructions/#placeholder-text

最新更新