pre标签中内容超出时换行

当超出时 td超出或者div超出 加如下样式

pre {
white-space: pre-wrap; /*css-3*/
white-space: -moz-pre-wrap; /*Mozilla,since1999*/
white-space: -pre-wrap; /*Opera4-6*/
white-space: -o-pre-wrap; /*Opera7*/
word-wrap: break-word; /*InternetExplorer5.5+*/
}

<td>

<?php echo '<pre style="white-space: pre-wrap; /*css-3*/
white-space: -moz-pre-wrap; /*Mozilla,since1999*/
white-space: -pre-wrap; /*Opera4-6*/
white-space: -o-pre-wrap; /*Opera7*/
word-wrap: break-word; /*InternetExplorer5.5+*/">';

print_r($data); echo "</pre>";?>

</td>

posted @ 2020-07-10 18:02  枯木逢春  阅读(1335)  评论(0编辑  收藏  举报