CSS 文本边框?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14553166/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 21:27:59  来源:igfitidea点击:

CSS text-border?

css

提问by Tomas Jancik

Possible Duplicate:
CSS Font Border?

可能重复:
CSS 字体边框?

Is it possible to set a 'text-border' with CSS?

是否可以使用 CSS设置“文本边框”?

Best would be to have multiple borders? something like on the image

最好是有多个边界?像图像上的东西

enter image description here

在此处输入图片说明

回答by AgnosticDev

Well you could try a font shadow. Something with multiple borders might have to be done with an image though.

那么你可以尝试字体阴影。但是,可能必须使用图像来完成具有多个边框的操作。

           text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;

回答by Andrea Ligios

I think you may want to take a look at CSS text-shadow

我想你可能想看看 CSS text-shadow

http://www.quirksmode.org/css/textshadow.html

http://www.quirksmode.org/css/textshadow.html

You cannot achieve multiple borders but you can do some amazing things with it:

你不能实现多个边界,但你可以用它做一些惊人的事情:

http://line25.com/articles/using-css-text-shadow-to-create-cool-text-effects

http://line25.com/articles/using-css-text-shadow-to-create-cool-text-effects

(i love that neon effect :)

(我喜欢那种霓虹效果:)

回答by Mat Richardson

You could simulate stroked text as in this previous answer:-

您可以像之前的答案一样模拟描边文本:-

Outline effect to text

对文本的轮廓效果