开发者

One element, two different fonts & font-size. possible?

开发者 https://www.devze.com 2023-03-16 22:10 出处:网络
I got a webpage displaying english and hebrew information. The default english font is Verdana, and since Verdana does not support hebrew letters, the next option is Arial.

I got a webpage displaying english and hebrew information. The default english font is Verdana, and since Verdana does not support hebrew letters, the next option is Arial. The problem is that 14px of english (Verdana) are slightly bigger than 14px of the hebrew (Arial). How can I declare that I want 14px of Verdana, but 16px of Arial on the same element?

Is there any 开发者_如何学Cpossible way of doing this ?

Thanks


Only if you surround either the english or hebrew with something like a <span> and then style the inline <span> accordingly


By different classes?

.english { font: 14px Verdana; }
.hebrew { font: 16px Arial; }


Well, it seems it can't be done... maybe with JS, but that's not the point. We had to gave up on Verdana.

0

精彩评论

暂无评论...
验证码 换一张
取 消