gpt4 book ai didi

html - CSS3 中 p 元素上的双文本阴影

转载 作者:太空狗 更新时间:2023-10-29 15:28:23 25 4
gpt4 key购买 nike

是否可以使用 CSS3 在一个 p 元素上应用两个 text-shadow 值?我想创建一个带有 1 像素 border 的非常浅的黑色 background

像这样:

text-shadow: 0 0 55px black; (very light black background to increase white text readabilitiy)
&
text-shadow: 0 1px 0 rgba(0,0,0, .25); (one pixel black drop shadow)

最佳答案

您可以简单地用逗号分隔阴影:

text-shadow: 0 0 55px black, 0 1px 0 rgba(0,0,0, .25);

Demo fiddle

您可能想要 have a look at this article on MDN了解更多信息。

The text-shadow CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and text-decorations of the element.

Each shadow is specified as an offset from the text, along with optional color and blur radius values. Multiple shadows are applied front-to-back, with the first-specified shadow on top.

关于html - CSS3 中 p 元素上的双文本阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22168506/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com