css3 text-shadow 为网页字体添加阴影

来源:互联网 发布:恋恋软件 编辑:程序博客网 时间:2024/05/30 23:45

css3 text-shadow 为网页字体添加阴影

text-shadow:为网页字体添加阴影, 可以通过对text-shadow属性设置相关的属性值,可以实现一些漂亮的字体阴影效果。

属性与值的说明如下:

text-shadow: [Color,X-offset,Y-offset,Blur]; 

color:指阴影的颜色;

X-offset:指阴影水平偏移的位置。

Y-offset:指阴影垂直偏移的位置。

Blur:指阴影的模糊值。

text-shadow:#000 5px 5px 5px;

示例代码:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title>text-shadow 为网页字体添加阴影</title>

<style>

.aixuexi{

  border:1px solid red;

  width:200px;height:100px;

  text-shadow:#996600 5px 5px 10px;

}

</style>

</head>

<body>

<div class='aixuexi'>what is your name!</div>

</body>

</html>

0 0