我创建了一个 .ttf 字体文件。我得到了所有大写字母,但没有小写字母。有没有一种工具或简单的方法可以使所有小写字母与大写字母相同?
示例:字体应该将“hello”显示为“HELLO”
如果那不可能,我可以用 HTML/CSS 做到这一点吗?
最佳答案
当然,您可以添加 CSS 规则:
body {
text-transform: uppercase;
}
@DominatorX 根据你的回答,你可以这样尝试:
var allDomElems = $('body *'),
helper;
allDomElems.each(function () {
helper = $(this).text();
helper = helper.toUpperCase();
if($(this).children().length === 0) {
$(this).text(helper);
}
});
这并非在所有情况下都有效,因此您必须调试脚本。
关于html - 将字体文件中的所有小写字母设为大写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27051768/