How can I replace text with CSS?

前端 未结 21 2536
暗喜
暗喜 2020-11-22 06:17

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

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

Instead of ( img

21条回答
  •  离开以前
    2020-11-22 07:15

    I use this trick:

    .pvw-title {
        text-indent: -999px;
    }
    .pvw-title:after {
        text-indent: 0px;
        float: left;
        content: 'My New Content';
    }
    

    I've even used this to handle internationalization of pages by just changing a base class...

    .translate-es .welcome {
        text-indent: -999px;
    }
    .translate-es .welcome:after {
        text-indent: 0px;
        float: left;
        content: '¡Bienvenidos!';
    }
    

提交回复
热议问题