目录

text-shadow

描述 (Description)

text-shadow属性指定一个或多个从元素文本派生的阴影。

可能的值 (Possible Values)

  • none - 不应将阴影与元素相关联。

  • color - 任何颜色值。 这给出了阴影的颜色。

  • length length length - 阴影的偏移距离和模糊半径,按x偏移,y偏移和模糊半径的顺序。

适用于 (Applies to)

所有HTML元素。

DOM语法 (DOM Syntax)

object.style.textShadow = "red";

例子 (Example)

以下是演示如何在文本周围设置阴影的示例。 所有浏览器可能都不支持此功能。

<html>
   <head>
   </head>
   <body>
      <p <b class="notranslate">style = "text-shadow:4px 4px 8px blue;"</b>>
         If your browser supports the CSS text-shadow property, 
         this text will have a  blue shadow.
      </p>
   </body>
</html> 

这将产生以下结果 -

新页面打开
↑回到顶部↑
WIKI教程 @2018