html5设置文字颜色灰色

武飞扬头像
PHP中文网
帮助57

 

html5设置文字颜色灰色的方法:

text-shadow属性向文本设置阴影。

  • 默认值: none

  • 继承性: yes

  • 版本: CSS3

语法:

object.style.textShadow=“2px 2px #ff0000”
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>文字阴影</title>
<style type="text/css">
p {
font-family:Verdana, Geneva, sans-serif;
font-weight:bold;
font-size:36px;
color:#f90;
text-shadow:-5px -5px 3px #00f,
5px 5px 3px #333;/* 添加文字阴影 */
}
</style>
<body>
<p>阴影属性<br />
  text-shadow</p>
</body>
</html>

本文出至:学新通

系列文章
更多 更多
同类精品
更多 更多
我要评论
我的头像
精彩评论
继续加载