DEV Community

Cover image for CSS Text Portrait
Photostockeditor
Photostockeditor

Posted on • Updated on

CSS Text Portrait

Image description

p {
  background: url('https://photostockeditor.com/asset/1080/16/1607/PSE154.jpg') center no-repeat;
  background-size: cover;
  width: 110%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: rgba(255, 255, 255, 0);
  line-height: 0.80;
  text-transform: uppercase;
  font-size: 0.5em;
}
Enter fullscreen mode Exit fullscreen mode

Image Source

Top comments (2)

Collapse
 
sloan profile image
Sloan the DEV Moderator

Just a heads up that you can add highlighting to the code blocks if you'd like. Just change:

code block with no colors example

... to specify the language:

code block with colors example

More details in our editor guide!

Collapse
 
photostockedit1 profile image
Photostockeditor

Thanks !!!