我有一个非常简单的HTML,我正在尝试(并且惨败)正确地格式化。我基本上有以下元素:
<pre>http://myserver.com:9000/something/REQUEST/124125125125?username=username&password=password</pre>
我基本上需要在前面模仿你在我上面看到的东西。如果需要,我需要将一行文本显示为pre中的单行文本,并带有水平滚动。
到目前为止,所有尝试这样做的尝试都失败了。 <pre>
作为<td>
的孩子存在:
<table>
<tbody>
<tr>
<td>
Behold some incredible, glowy sample text, and then a URL:
<pre>...</pre>
</td>
</tr>
</tbody>
</table>
答案 0 :(得分:2)
StackOverflow使用
overflow: auto;
width: auto;
在<pre>