2017-04-07 5 views
0

HTMLページに<pre>タグを使用していますが、フルラインは表示されません。私は何を表示したかったことはライン以下hwole 2である: HTMLプレタグでフルラインが表示されない

 
    Hello Wish you all the best. This is just a testing of multiline as it is cutting the print work order.Multi formatting within email notifications and work order comments/notes 
    End Line. Last Comment. 

しかし、それだけ

<pre> 
    Hello Wish you all the best. This is just a testing of multiline as 
    End Line. Last Comment. 
    </pre> 

が表示されているpreタグはwidhtか何かを固定していますか?どんな提案も歓迎されます。

答えて

1

これは、preタグでラップしたコードです。私の家から上品に見えます。

<pre> 
 
Hello Wish you all the best. This is just a testing of multiline as it is cutting the print work order.Multi formatting within email notifications and work order comments/notes 
 
    End Line. Last Comment. 
 
    </pre>

2

あなたはオーバーフローが隠されていた場合に表示するために隠されたもののためのオーバーフローが必要になります。スクロールバーが追加されます。

pre { 
    overflow: auto; 
} 

スクロールがオプションでない場合、またはプレタグをラップする必要があります。その使用のために

pre { 
    white-space: pre-wrap; 
} 

これで、白いスペースを維持しながら行が折り返され、次の行に表示されます。

関連する問題