css3 text-shadow 为网页字体添加阴影
css3 text-shadow 為網(wǎng)頁(yè)字體添加陰影
text-shadow:為網(wǎng)頁(yè)字體添加陰影, 可以通過(guò)對(duì)text-shadow屬性設(shè)置相關(guān)的屬性值,可以實(shí)現(xiàn)一些漂亮的字體陰影效果。
屬性與值的說(shuō)明如下:
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 為網(wǎng)頁(yè)字體添加陰影</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>
總結(jié)
以上是生活随笔為你收集整理的css3 text-shadow 为网页字体添加阴影的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: CSS3之利用选择器和content属性
- 下一篇: CSS自动换行,强迫不换行