How can I replace text with CSS?

前端 未结 21 2178
暗喜
暗喜 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:19

    Try using :before and :after. One inserts text after HTML is rendered, and the other inserts before HTML is rendered. If you want to replace text, leave button content empty.

    This example sets the button text according to the size of the screen width.

    
    
    
    
      
      
    
    

    Button text:

    1. With :before

      big screenxxx

      big screen

    2. With :after

      xxxbig screen

      big screen

提交回复
热议问题