Get the App
SLTechnology News&Howtos  ›  Development  › 

How to write the code that css3 adds shadows to the title

Shulou Source: shulou.com Published: 2022-05-31 20:35:44 10月02日 Update

In this article Xiaobian for you to introduce in detail the "css3 add shadow to the title of the code how to write", the content is detailed, the steps are clear, the details are handled properly, I hope this "css3 add shadow to the title of the code how to write" article can help you solve doubts, following the editor's ideas slowly in-depth, together to learn new knowledge.

In css3, the code to add shadows to the title is "title element {text-shadow: horizontal Shadow position Vertical Shadow position Blur distance Shadow Color}"; the "text-shadow" attribute is used to add shadows to text, and the values of horizontal and vertical shadow positions in this attribute can be set to negative values.

The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.

What is the code for css3 to add shadows to the title

The text-shadow attribute is applied to shaded text.

The syntax is:

Text-shadow: h-shadow v-shadow blur color

The text-shadow property connects one or more shaded text. Property is a shadow, and every 2 or 3 specified length values and an optional color value are separated by a comma. The length of the spent period is 0.

The parameters are expressed as follows:

H-shadow is required. The position of the horizontal shadow. Negative values are allowed.

V-shadow is required. The position of the vertical shadow. Negative values are allowed.

Blur is optional. A blurred distance.

Color is optional. The color of the shadow.

Examples are as follows:

123h2 {text-shadow:2px 2px 8px # FF0000;} Text-shadow with blur effect

Note: IE 9 and earlier browsers do not support the text-shadow attribute.

Output result:

Read here, this "css3 add shadow to the title of the code how to write" article has been introduced, want to master the knowledge of this article still need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.

Tags: Shadow title attribute code location text article negative value color content more horizontal version length proper peace element parameter idea tutorial Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Huawei NVidia MySQL Docker