In this post, we will learn how to add shadows to text, and below are the details.
- Here we can add shadows to text using below CSS property.
- Use below mentioned CSS to any HTML element
- We have used text-shadow CSS property to display text shadow
- text-shadow takes offset on the x-axis, offset on the y-axis, blur radius and color.
.container h1 {
color: yellow;
text-shadow: 2px 4px 4px rgb(142 173 46 / 60%);
}
<div class="container">
<h1>This is my Heading</h1>
</div>