如何用 CSS 替换文本? [英] How can I replace text with CSS?
本文介绍了如何用 CSS 替换文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用这样的方法用 CSS 替换文本:
How can I replace text with CSS using a method like this:
.pvw-title img[src*="IKON.img"] { visibility:hidden; }
代替( img[src*="IKON.img"]
),我需要使用可以替换文本的东西.
Instead of ( img[src*="IKON.img"]
), I need to use something that can replace text instead.
我必须使用 [
]
来让它工作.
I have to use [
]
to get it to work.
<div class="pvw-title">事实</div>
我需要替换事实".
推荐答案
或者,也许您可以将事实"包裹在 中,如下所示:
Or maybe you could wrap 'Facts' round a <span>
as follows:
.pvw-title span {
display: none;
}
.pvw-title:after {
content: 'whatever it is you want to add';
}
<div class="pvw-title"><span>Facts</span></div>
这篇关于如何用 CSS 替换文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文