我使用xhtml2pdf在django中生成报告,我想让我的一个单元格文本垂直显示,但我无法使用css。
以下是一些尝试:
.vertical-text {
writing-mode: tb-rl;
}
<table>
<tbody>
<tr>
<td class="vertical-text" >V text</td>
</tr>
</tbody>
</table>更新
writing-mode属性在支持的css属性中丢失。有什么解决办法吗?
发布于 2017-07-17 09:19:21
还有一项工作,我们可以使用css:JSFiddle。
.verical-text {
width:1px;
font-family: monospace;
white-space: pre-wrap; /* this is for displaying whitespaces including Firefox */
}但是,这里有几个垮台:
我建议使用其他一些工具,在这些工具中,您不会受到css属性的限制,例如:
https://stackoverflow.com/questions/45071855
复制相似问题