Posar imatges de fons a les tipografies

A vegades ens interessa posar tipografies que, enlloc d'un color determinat, tinguin un fons d'imatge. Utilitzarem el CSS següent:

div#fonsimg{
  font-family: 'Oswald', sans-serif;
  text-align: center;
  font-size: 10em;
  background: url('https://jooinn.com/images1280_/coffee-grains-4.jpg');   
  background-clip: border-box;
  background: -webkit-linear-gradient(to right, #ffb232 70%, #ff0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-repeat: no-repeat;
  background-size: cover;
  font-weight: bold;
  width:100%;
  height:300px;
}
HOLA

Comentaris