How to write text projection in css

藏色散人
Release: 2021-11-10 11:29:18
Original
3926 people have browsed it

How to achieve text projection effect in css: 1. Create an HTML sample file; 2. Define the text content; 3. Achieve text projection effect by setting the "text-shadow: 5px 5px 5px #FF0000;" style. Can.

How to write text projection in css

The operating environment of this article: windows7 system, HTML5&&CSS3 version, DELL G3 computer

How to write text projection in css?

Can be achieved through the text-shadow attribute.

Introduction:

The text-shadow property sets a shadow to text.

Syntax

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

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.

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.

Basic example:

<!DOCTYPE html>
<html>
<head>
<style>
h1
{
text-shadow: 5px 5px 5px #FF0000;
}
</style>
</head>
<body>

<h1>文本阴影效果!</h1>

</body>
</html>
Copy after login

The effect is as follows:

How to write text projection in css

##Video recommendation: "

css video tutorial

The above is the detailed content of How to write text projection in css. 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