JSFiddle - React, Tailwind, and code Playground
HTML
<h1>Gradient text</h1>
<div class="clip-text">Cactusthemes</div>
CSS
body{
text-align: center;
}
h1 {
display: inline-block;
margin: 0 auto;
font-family: "Roboto Slab";
font-weight: 400;
font-size: 5em;
background: linear-gradient(330deg, green , blue );
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
line-height: 200px;
}
.clip-text {
font-size: 6em;
font-weight: bold;
line-height: 1;
position: relative;
display: inline-block;
margin: .25em;
padding: .5em .75em;
text-align: center;
color: #fff;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-image: url(http://cdn8.staztic.com/app/a/6278/6278761/hd-abstract-wallpapers-1-0-s-307x512.jpg);
}
.clip-text:before {
content: '';
z-index: -2;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-image: inherit;
position: absolute;
}
.clip-text:after {
content: '';
position: absolute;
z-index: -1;
top: .125em;
right: .125em;
bottom: .125em;
left: .125em;
background-color: #000;
}