为什么我的小型字体变体CSS类被忽略? [英] Why is my small-caps font-variant CSS class being disregarded?
本文介绍了为什么我的小型字体变体CSS类被忽略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我添加了这个CSS类:
.beanies {
font-variant:small-caps;
}
我从几个地方称呼它,再加上另一个类,尝试它们两个这样:
< p class =coolPools beanies> LICENSE#764014< / p>
...和此:
< h3 class =statelyPresence,beanies>新游泳池法需要立即采取行动在所有公寓和公寓泳池和水疗中心< / h3>
(IOW,在我应用于元素的两个类之间有或没有分隔逗号)
...在任何情况下,文字都显示在小写字母中。
我做错了什么?
解决方案
它正在工作,你没有错。但它不可见,因为你有所有的大写字母。
写下:
.beanies {
font-variant:small-caps;
text-transform:小写;
}
.beanies:第一个字母{
text-transform:uppercase;
}
I added this CSS class:
.beanies {
font-variant: small-caps;
}
I call it from a couple places, coupled with another class, trying it both this way:
<p class="coolPools beanies">LICENSE #764014</p>
...and this:
<h3 class="statelyPresence, beanies">NEW POOL LAW REQUIRES IMMEDIATE ACTION AT ALL APARTMENT AND CONDOMINIUM POOLS AND SPAS</h3>
(IOW, with or without a separating comma between the two classes I'm applying to the element)
...and in neither case does the text display in small caps.
What am I doing wrong?
解决方案
It is working and you are not wrong. But it is not visible because you have all capital letters.
Write this:
.beanies {
font-variant: small-caps;
text-transform: lowercase;
}
.beanies:first-letter {
text-transform: uppercase;
}
这篇关于为什么我的小型字体变体CSS类被忽略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文