Awesome textured text with html and css

Posted on January 9th, 2020

Do you know how to create an awesome textured text with html and css? It is very simple. And here is how you can do it from Darkcode. Just click on the button Run Pen below, to see how it works:

How to create an awesome textured text

Step 1: Add Html

<div class="text">darkcode</div>

Step 2: Add CSS

body {
  margin: 0;
  padding: 0;
  font-family: 'montserrat', sans-serif;
  background: url(https://res.cloudinary.com/drcrre4xg/image/upload/v1578584481/bg_mcnuhk.jpg)
    center no-repeat;
  background-size: cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text {
  font-size: 8em;
  text-transform: uppercase;
  font-weight: 900;
  color: #fff;
  mask-image: url(https://res.cloudinary.com/drcrre4xg/image/upload/v1578584486/mask_hphgdl.png);
  -webkit-mask-image: url(https://res.cloudinary.com/drcrre4xg/image/upload/v1578584486/mask_hphgdl.png);
}