【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;
2. Flicker (use the overlay effect of text-shadow in all directions)
text-shadow: 0 0 .1em,0 0 .3em;
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;
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;
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!