在HTML元素中选择特定的文本 [英] Select particular text in HTML element
本文介绍了在HTML元素中选择特定的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须在div标签中选择特定的单词.
I have to select particular word in div tag.
HTML
<div>This is my text</div>
在这里我需要选择单词my
.
Here i need a select the word my
.
仅靠CSS是否有可能实现?
Is it possible to achieve with CSS alone?
推荐答案
HTML:
<div> This is <span id="myspan"> my </span> text </div>
CSS:
#myspan {
ENTER CSS HERE
}
没有其他机会(除非您将跨度更改为任何其他标签)
there's no other chance (unless you change the span to any other tag)
这篇关于在HTML元素中选择特定的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文