首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过使用CSS将单词的第一个字母大写,以将其呈现在铜版哥特式中

通过使用CSS将单词的第一个字母大写,以将其呈现在铜版哥特式中
EN

Stack Overflow用户
提问于 2012-06-22 18:04:48
回答 4查看 2.3K关注 0票数 1

我在网站的主菜单中使用“铜版哥特式”字体。由于铜板哥特式的全部大写特性,我在某些地方使用它来大写每个单词的第一个字母。如何使用CSS将字体“铜版哥特式”分配给单词的第一个字母?

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2012-06-22 20:02:46

铜版哥特式字体是默认的大写字体,而不是小写字体。“虽然从来没有设计过真正的小写,但铜版哥特式字体非常适合通常用小写字体设置的全大写文本”参考:http://www.microsoft.com/typography/fonts/family.aspx?FID=40

票数 1
EN

Stack Overflow用户

发布于 2012-06-22 18:06:51

代码语言:javascript
复制
text-transform:capitalize;

您可以添加css

票数 0
EN

Stack Overflow用户

发布于 2012-06-22 18:08:21

您可以通过text-transforn属性轻松获得所需的结果。

CSS

代码语言:javascript
复制
 p.capitalize {text-transform:capitalize;}

HTML

代码语言:javascript
复制
<p class="capitalize">This is some text.This is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is some textThis is</p>

请看演示:- http://jsfiddle.net/dkxUX/18/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11154135

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档