gpt4 book ai didi

html - 样式 » 内部跨度

转载 作者:太空宇宙 更新时间:2023-11-04 04:49:12 28 4
gpt4 key购买 nike

假设我有一个看起来像这样的跨度:

<span> This is my string &raquo;  and it continues </span>

我希望该跨度内的字体颜色为黑色,除了我希望它为红色的 »。

这样做的好方法是什么?

谢谢

最佳答案

最好的 HTML/CSS 方式是

<span> This is my string <span>&raquo;</span> and it continues </span>

并设计你的内心 <span>如你所愿

span { color: #000 }
span span { color: #c00 }

关于html - 样式 » 内部跨度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13804738/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com