问题描述
我有一个带有元音的阿拉伯字符,例如 تُ。 我想用一种颜色为基本字符(Taa)上色,它上面的两个点用单独的颜色和两个点顶部的符号用另一种颜色在 HTML 页面上。 是否有可能? 如果可能,我该怎么做? 示例表示赞赏。
解决方法
没有任何解决方法是不可能的,但是您可以借助一些 unicode 字符映射将角色的不同部分分开,并使它们像主角的模块一样,并在伪选择器的帮助下组合它们。然后你就可以单独给它们上色了。
h1 {
color:red;
position: relative;
}
h1::before {
content: "ܸ";
color:green;
position: absolute;
left: 0.45ch;
bottom: 1ch;
}
h1::after {
content: "ُ";
color:blue;
position: absolute;
left:0.1ch;
bottom: -0.2ch;
}
<h1>ٮ</h1>