Home > Web Front-end > Front-end Q&A > How to use css text-shadow property

How to use css text-shadow property

青灯夜游
Release: 2019-05-30 11:14:36
Original
3563 people have browsed it

css The text-shadow property is used to add one or more shadows to text; the shadow list needs to be separated by commas. Each shadow has two or three length values ​​​​and an optional color value to specify, the length is omitted The value is 0.

How to use css text-shadow property

How to use the css text-shadow property?

The text-shadow property sets a shadow to text.

Syntax:

text-shadow: h-shadow v-shadow blur color
Copy after login

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 is optional. Blurred distance.

●Color is optional. The color of the shadow.

Comments: The text-shadow property adds one or more shadows to text. This property is a comma-separated list of shades, each shade specified with two or three length values ​​and an optional color value. The omitted length is 0.

css text-shadow property example

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<style>
h1
{
text-shadow: 5px 5px 5px #FF0000;
}
</style>
</head>
<body>
<h1>文本阴影效果!</h1>
</body>
</html>
Copy after login

Rendering:

How to use css text-shadow property

The above is the detailed content of How to use css text-shadow property. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template