使用CSS定位某些单词? [英] Target certain words with CSS?
本文介绍了使用CSS定位某些单词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是一个理论问题,但我想知道是否可能。
This is kind of a theory question but I wonder whether it is possible or not.
因此,如果您的div内容类似于...
So if you have a div with some content like...
<div>£100.00 - BUY</div>
然后您可以定位 100英镑而不定位其余部分吗?
Can you then target "£100.00" without targeting the rest?
那么您可以增加100.00英镑的字体大小吗?
So you can increase the font size of £100.00?
推荐答案
您可以通过包装来定位在 span
元素中:
You could target it by wrapping it in a span
element:
<div><span class="price">$100.00</span> - BUY</div
这篇关于使用CSS定位某些单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文