How to add text-shadow
Adding a shadow for boxes is pretty simple. But how do we add a shadow to text? It is possible with the text-shadow
property. It works in much the same way as box-shadow
. Here's the definition:
text-shadow: horizontal-shadow vertical-shadow blur-radius color
Let's create an example based on the previous chapter's code to better understand the text-shadow
property:
HTML:
<div class="container"> <div class="box_container"> <div class="box__bottom_right">bottom right</div> </div> <div class="box_container"> <div class="box__bottom_left">bottom left</div> </div> <div class="box_container"> <div class="box__top_right">top right</div> </div> <div class="box_container"> <div class="box__top_left">top left</div> </div> <div class="box_container"> <div class="box__blurred">blurred</div>...