Home >Web Front-end >CSS Tutorial >Text-shadow text effects implementation method

Text-shadow text effects implementation method

高洛峰
高洛峰Original
2017-03-28 10:21:532558browse

【Definition】

基础的文本阴影效果,不过对text-shadow属性加以应用可以得到很多绚丽的效果。注:IE9-不支持该属性。

【Grammar】

text-shadow: h-shadow v-shadow blur color;
h-shadow:必需。水平阴影的位置。允许负值。
v-shadow:必需。垂直阴影的位置。允许负值。
blur:可选。模糊的距离。
color:可选。阴影的颜色。

【Effect】

1. Printing effect (recommended: dark characters, light background, shadow below the font, light Add a shadow above the font with a deep bottom)

text-shadow: 0 1px 1px black;
text-shadow: 0 -1px 1px black;

Text-shadow text effects implementation method

2. Flicker (use the overlay effect of text-shadow in all directions)

text-shadow: 0 0 .1em,0 0 .3em;

Text-shadow text effects implementation method

3. Hollow words (using the offset of text-shadow in different directions)

text-shadow: 1px 1px black,-1px -1px black,1px -1px black,-1px 1px black;

Text-shadow text effects implementation method

4.3d effect (using text-shadow in the same Directional overlay effect)

text-shadow: 0 1px hsl(0,0%,85%),
            0 2px hsl(0,0%,80%),
            0 3px hsl(0,0%,75%),
            0 4px hsl(0,0%,70%),
            0 5px hsl(0,0%,65%),
            0 5px 10px black;

Text-shadow text effects implementation method



The above is the detailed content of Text-shadow text effects implementation method. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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