如何解决阿拉伯语文本在 Open edX
我已经阅读了一些较旧的类似问题并尝试了一些建议的 html 解决方案,但到目前为止没有任何效果(至少这三个:
<div dir="rtl"></div>; <td dir="rtl"></td>; <html dir="rtl"></html>
)
我需要创建一个表格,左栏是英文,右栏是阿拉伯语。
我使用的代码奇怪地在 Open edX 站点的某些页面上工作了一段时间(FUN MOOC,以防万一),但几天前他们更改了界面后,它就不再工作了(所以我希望只是暂时的)。此外,在课程工作室/编辑器上,文本很好,但在课程预览页面上它是左对齐的。这是我的代码:
<table>
<tbody>
<tr>
<td td style="border: none; vertical-align: top; width: 49.25%">
<p align="justify"> </p>
</td>
<td style="border: none; width: 1.5%"> </td>
<td td style="border: none; vertical-align: top; width: 49.25%">
<p align="justify" lang="ar" dir="rtl"></p>
</td>
</tr>
</tbody>
</table>
我也在另一个页面上用过这个来写几个标题,但想避免使用这个代码(没有尝试检查界面更改后这是否仍然有效):
<h2 style="text-align:right">
<span style="float:left">eng text</span>
arabic text
</h2>
我的问题是:如何解决这个问题?我可以使用哪些其他代码? (我不太了解 CSS,所以 HTML 中的解决方案会很棒)。
如果您需要更多详细信息,我当然可以提供给您。感谢您的帮助!
解决方法
如果无法访问该页面,很难判断问题出在哪里,但一种可能性是您的 int main() {
int total;
int num1,num2;
int choice;
while(1)
{
choice = UI();
if (choice == 1) {
cout << "Input two numbers you wish to calculate for :";
cin >> num1;
cin >> num2;
total = add(num1,num2);
cout << " the total is " << total << "\n";
break;
} else if (choice == 2) {
cout << "Input two numbers you wish to calculate for :";
cin >> num1;
cin >> num2;
total = subtract(num1,num2);
cout << " the total is " << total << "\n";
break;
} else if (choice == 3) {
cout << "Input two numbers you wish to calculate for :";
cin >> num1;
cin >> num2;
total = multiply(num1,num2);
cout << " the total is " << total << "\n";
break;
} else if (choice == 4) {
cout << "Input two numbers you wish to calculate for :";
cin >> num1;
cin >> num2;
total = divide(num1,num2);
cout << " the total is " << total << "\n";
break;
} else {
cout << "Entered wrong input,please select option 1 - 5";
}
}
return 0;
}
以某种方式通过 CSS dir="rtl"
被覆盖。
尝试将 direction
添加到您的 RTL style="direction:rtl;"
元素,看看是否能解决问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。