我检查了prior posts仍然无法正常工作。您如何在同一行上将文本的翻译左右对齐?我同时使用阿拉伯语和英语。考虑尝试使用表格和一些 CSS,但如何使用?
<table width="100%"><tr><td height="30px">
3) What services do you provide?
</td>
<td class="arabic">
ما هي الخدمات التي تقدّمها؟
</td></tr></table>
3) 你们提供什么服务? ما هي الخدمات التي تودّمها؟
最佳答案
要从右到左显示文本,您可以使用 direction属性(property)。
Set the direction CSS property to match the direction of the text: rtl for languages written from right-to-left (like Hebrew or Arabic) text and ltr for other scripts.
.arabic {
direction: rtl;
}
<table width="100%">
<tr>
<td height="30px">
3) What services do you provide?
</td>
<td class="arabic">
ما هي الخدمات التي تقدّمها؟
</td>
</tr>
</table>
您还可以使用 float
使文本呈现在右侧。
.arabic {
float: right;
}
<table width="100%">
<tr>
<td height="30px">
3) What services do you provide?
</td>
<td class="arabic">
ما هي الخدمات التي تقدّمها؟
</td>
</tr>
</table>
关于css - 同时在左侧格式化一些文本,在右侧格式化一些文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32070694/