← Voltar na listagem
28 de abril de 2022 • 1 min de leitura
Como colocar uma imagem de fundo em um texto
Um jeito fácil e rápido de adicionar um background em um texto
Usando a propriedade -webkit-text-fill-color e -webkit-background-clip
body {
background: #1f2227;
text-align: center;
}
.text {
background: url('bg.jpg');
background-repeat: no-repeat;
background-size: cover;
font-weight: bold;
font-family: verdana, sans-serif;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
font-size: 7em;
}
Resultado final