CrazyLab

≡
⟱

CrazyLab

Today is not a preview of tomorrow, today is today !!!

Use css shadow to elegantly make text readble on any background

Published 24/09/2018 at 09:39 am

A quick trick to make some text readble regardless of the background color is to add some CSS text shadow:

text-shadow: 2px 2px 2px rgba(255, 255, 255, 2), -2px -2px 2px rgba(255, 255, 255, 2), -2px 2px 2px rgba(255, 255, 255, 2), 2px -2px 2px rgba(255, 255, 255, 2);

This code should be adapted to the font color and size, but once you find the correct settings, you can add text to any  background color or image and the shadow will make the needed contrast to make your text readble ...

Leave a comment below:

Name:
Site:
E-mail: