Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use css3 to realize concave font

Shulou Source: shulou.com Published: 2022-06-02 06:05:40 10月04日 Update

This article introduces you how to use css3 to achieve concave fonts, the content is very detailed, interested friends can refer to, I hope to help you. Methods: 1. Use the color attribute to set the font color to be consistent with the background color;2. Use the text-shadow attribute to add shadow to the text to achieve the concave font effect. The syntax is "text-shadow: -1px -1px #000, 1px 1 px #fff;".

Operating environment of this tutorial: Windows 7 system, CSS3 && HTML5 version, Dell G3 computer.

Using css3 to realize concave font

1. Use the color attribute to match the text color setting with the background color

2. Use the text-shadow attribute to shadow text to achieve a concave font effect

Implementation code:

body {background-color: #ccc;}div {color: #ccc;font: 700 50px "Microsoft Yahei";}div {text-shadow: -1px -1px 1px #000, 1px 1 px #fff;} I am a recessed text

About how to use css3 to achieve concave fonts to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Tags: Fonts attributes text consistency content effects more background Shadows colors help good Code interests guys Partners tutorials articles methods Environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Xiaomi MySQL Linux Huawei