Home > Article > Web Front-end > How to write text projection in css
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.
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;
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>
The effect is as follows:
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!