CSS: Replacing a text on hover, but smooth transition to the new text does not work?
问题 The scenario: If a user hovers over a text (e.g. an h1-tag), it should change to a new text. The new text should appear smoothly. What I've done so far: I was able to replace a text with a new one with the "display:none" and the "content: 'This is the new text' "-property. My problem is that the new text does not appear smoothly (it does not fade in/transitions). I've also tried to use opacity, but it doesn't replace my old text (instead it just disappears and the new text appears next to it)