如何用CSS替换文本? [英] How can I replace text with CSS?

查看:130
本文介绍了如何用CSS替换文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用css替换文本:

  .pvw-title img [src * = IKON.img] {visibility:hidden; } 

而不是( img [src * =IKON.img]



我必须使用 [

< div class = pvw-title> Facts< / div>



我需要替换Facts。


<或者你可以在< span> 上包装Facts,如下所示:

 < div class =pvw-title>< span> Facts< / span>< / div> 

然后使用:

  .pvw-title span {
display:none;
}
.pvw-title:after {
content:'whatever it is you want to add';
}


How can I replace text with css using a method like this:

.pvw-title img[src*="IKON.img"] { visibility:hidden; }

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">Facts</div>

I need to replace "Facts".

解决方案

Or maybe you could wrap 'Facts' round a <span> as follows:

<div class="pvw-title"><span>Facts</span></div>

Then use:

.pvw-title span {
  display: none;
}
.pvw-title:after {
  content: 'whatever it is you want to add';
}

这篇关于如何用CSS替换文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆