我们可以将包含<text>的SVG作为data URL传递,就像这样: body { height: 100vh; background: #272b2d; background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='0.8em' font-size='100'></text></svg>"); background-size: cover; }
content
键。 - sebix