.
3ss.cn

html5怎么设置文字颜色灰色

html5设置文字颜色灰色的方法:使用属性【text-shadow】向文本设置阴影,语法为【object.style.textShadow=“2px 2px #ff0000”】。

本教程操作环境:windows7系统、html5版,DELL G3电脑。

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>
赞(0)
未经允许不得转载:互联学术 » html5怎么设置文字颜色灰色

评论 抢沙发