Safari不尊重希腊语言环境的文本转换:大写
Safari不尊重text-transform:uppercase;
css规则,
的lang属性。 但是,它适用于Chrome的
字符串,并具有所有上音字母的重音,
但是如果我们通过JavaScript做到这一点,则所有功能都可以用
“πρόκριση” .tolocaleuperpercase('el'')//
是否存在其他解决方法或解决方案?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<style>
p {
text-transform: uppercase;
}
</style>
</head>
<body>
<p lang="el">Πρόκριση</p>
<p>Πρόκριση</p>
</body>
</html>
Chrome | Safari |
---|---|
Safari doesn't respect lang attribute for Greek locale for text-transform: uppercase;
css rule,
but it works perfectly for Chrome
For string with all uppercased letters accent should be removed
But if we make it by JavaScript everything works fine for both
"Πρόκριση".toLocaleUpperCase('el') // "ΠΡΟΚΡΙΣΗ"
Is there exists any another workaround or solution?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<style>
p {
text-transform: uppercase;
}
</style>
</head>
<body>
<p lang="el">Πρόκριση</p>
<p>Πρόκριση</p>
</body>
</html>
Chrome | Safari |
---|---|
![]() | ![]() |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论