How to make text have shadow in css

王林
Release: 2020-11-20 14:09:25
Original
4405 people have browsed it

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.

How to make text have shadow 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;
Copy after login

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; }
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!