Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
279 views
in Technique[技术] by (71.8m points)

css - CSS字体边框?(CSS Font Border?)

With all the new CSS3 border stuff going on ( -webkit , ...) is it now possible to add a border to your font?

(随着所有新的CSS3边框填充( -webkit ,...),现在是否可以为字体添加边框?)

(Like the solid white border around the blue Twitter logo).

((就像蓝色的Twitter徽标周围的纯白色边框一样)。)

If not, are there any not-too-ugly hacks that will accomplish this in CSS/XHTML or do I still need to fire up Photoshop?

(如果不是,是否有任何不太丑陋的骇客会在CSS / XHTML中完成此任务,还是我仍然需要启动Photoshop?)

  ask by Lars Tackmann translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The right answer is:

(正确的答案是:)

 h1 { color: yellow; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; } 
 <h1>Hello World</h1> 

This will set four same type shadows from the four sides.

(这将从四个侧面设置四个相同类型的阴影。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...