html - 表格列从右到左开始

标签 html

<table border="1">
    <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
    <td>4</td>
    </tr>

    <tr>
    <td>5</td>
    <td>6</td>
    <td>7</td>
    </tr>
</table>

这段 HTML 代码为我提供了以下内容
1 2 3 4
5 6 7

但我希望表格从右到左打印列,如下所示
4 3 2 1
* 7 6 5

*是空格
我需要它完全像这个结果:http://postimg.org/image/la8aj8ckd/

最佳答案

您可以像这样在表上添加 dir=rtl 来做到这一点:

<table border="1" DIR="RTL">

更多信息,您可以阅读http://www.i18nguy.com/markup/right-to-left.html

希望对你有帮助

关于html - 表格列从右到左开始,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16805147/

相关文章:

javascript - jQuery text() 和 show() 不起作用(RoR 应用程序)

javascript - 未捕获的 TypeError : $(. ..).multiselect 不是函数

javascript - jQuery - 防止跳转但遵循散列链接

javascript - 根据其他类的 css 样式操作类的 css 样式

jquery - 使用 jQuery 添加多个背景

html - R knitr 在表头 kable() 中添加换行符

jquery - 将 css 动态添加到第 4 至 6 行

php - 如何使用 PHP 变量在 CSS 中制作条形图?

javascript - CSS/Javascript 不绑定(bind)动态 html 追加

css - 为什么a :link in one div affect the a:link in another?