text-shadow 属性为文字添加阴影。阴影值由元件在 X 和 Y 方向的偏移量、模糊半径和颜色值组成。
text-shadow
/* offset-x | offset-y | blur-radius | color */ text-shadow: 1px 1px 2px black; /* color | offset-x | offset-y | blur-radius */ text-shadow: #fc0 1px 0 10px; /* offset-x | offset-y | color */ text-shadow: 5px 5px #558abb; /* color | offset-x | offset-y */ text-shadow: white 2px 5px; /* offset-x | offset-y /* Use defaults for color and blur-radius */ text-shadow: 5px 10px;
none | [ <length>{3} <color> ]
暂时只支持指定单层阴影,即使指定了多层阴影,也只有第一层会生效。
指定阴影时,offset-x, offset-y, blur-radius 和 color 都不能省略。
offset-x
offset-y
blur-radius
color
Loading...