Пример:
Текст на
однородном
фоне
однородном
фоне
Цвет фона и текста: #FFFFFF
Цвет контура теста: #FFFFFF
Текст из примера можно редактировать
При светлых тонах цвет фона, текста и контура может быть одинаковый.
HTML:
1 2 3 4 5 |
<div class="shadow-wrap"> <div class="shadow-text"> <div>Текст на<br>однородном<br>фоне</div> </div> </div> |
CSS:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
.shadow-wrap { background: #FFF; /* Цвет фона */ padding: 6px 0 40px 0; margin: 10px 0 20px 0; } .shadow-text { box-sizing: border-box; margin: 20px 60px; padding: 20px 30px; box-shadow: -9px 17px 9px rgba(0,0,0,0.05), -10px 19px 10px rgba(0,0,0,0.05), -11px 20px 11px rgba(0,0,0,0.025), -12px 22px 12px rgba(0,0,0,0.025), -13px 24px 13px rgba(0,0,0,0.025), -14px 26px 14px rgba(0,0,0,0.025), -15px 28px 15px rgba(0,0,0,0.025), -16px 30px 16px rgba(0,0,0,0.025), -17px 32px 17px rgba(0,0,0,0.025), -18px 34px 18px rgba(0,0,0,0.025), -19px 36px 19px rgba(0,0,0,0.025), -20px 38px 20px rgba(0,0,0,0.025), -21px 39px 21px rgba(0,0,0,0.025); } .shadow-text div { font-size: 60px; letter-spacing: 4px; font-weight: 600; margin: 0; font-family: 'Roboto', sans-serif; text-transform: uppercase; line-height: 1.2; color: #FFF; /* Цвет текста */ text-shadow: -1px -1px 0 #FFF, /* Цвет контура */ 1px -1px 0 #FFF, /* Цвет контура */ -1px 1px 0 #FFF, /* Цвет контура */ 1px 1px 0 #FFF, /* Цвет контура */ -2px -2px 0 rgba(0,0,0,0.05), 2px -2px 0 rgba(0,0,0,0.05), -2px 2px 0 rgba(0,0,0,0.05), 2px 2px 0 rgba(0,0,0,0.05), -1px 2px 1px rgba(0,0,0,0.15), -2px 4px 2px rgba(0,0,0,0.125), -3px 6px 3px rgba(0,0,0,0.125), -4px 8px 4px rgba(0,0,0,0.1), -5px 10px 5px rgba(0,0,0,0.1), -6px 12px 6px rgba(0,0,0,0.075), -7px 13px 7px rgba(0,0,0,0.05), -8px 15px 8px rgba(0,0,0,0.05), -9px 17px 9px rgba(0,0,0,0.05), -10px 19px 10px rgba(0,0,0,0.05), -11px 20px 11px rgba(0,0,0,0.025), -12px 22px 12px rgba(0,0,0,0.025), -13px 24px 13px rgba(0,0,0,0.025), -14px 26px 14px rgba(0,0,0,0.025), -15px 28px 15px rgba(0,0,0,0.025), -16px 30px 16px rgba(0,0,0,0.025), -17px 32px 17px rgba(0,0,0,0.025), -18px 34px 18px rgba(0,0,0,0.025), -19px 36px 19px rgba(0,0,0,0.025), -20px 38px 20px rgba(0,0,0,0.025), -21px 39px 21px rgba(0,0,0,0.025); } @media (max-width: 767px) { .shadow-text { margin: 20px; } .shadow-text div { font-size: 30px; } } |
Добавить комментарий: