How to add a shadow to text in css: You can add a shadow to the text by using the text-shadow attribute, such as [text-shadow: 2px 2px #ff0000;]. The text-shadow property is specifically applied to shadow text in CSS.
Related properties:
The text-shadow property applies to shadow text.
(Learning video sharing:css video tutorial)
Syntax:
text-shadow: h-shadow v-shadow blur color;
The text-shadow property connects one or more shadow texts. The property is a shadow, specifying every 2 or 3 length values and an optional color value separated by commas. The expired length is 0.
Attribute value:
h-shadow Required. The position of the horizontal shadow. Negative values are allowed.
#v-shadow Required. The position of the vertical shadow. Negative values are allowed.
#blur Optional. Blurred distance.
#color Optional. The color of the shadow.
Example:
h1 { text-shadow: 2px 2px #ff0000; }
Related recommendations:CSS tutorial
The above is the detailed content of How to make text have shadow in css. For more information, please follow other related articles on the PHP Chinese website!