pre换行段落间距

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>我的主页</title>
<script src="vendor/jquery-1.8.3.min.js"></script>
<style>
pre{ white-space: pre-wrap;white-space: -moz-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;}
span{display: block;100%;height: 20px;}
</style>
</head>
<body>
<div>
<pre id="aaa">
你说什么鬼啊啊啊啊啊。
多少大声道卡接收到开机按时打卡啊就是打开就啊山东矿机按时还打算大声地扩奥数和登记卡收到。
有没有用给看看?

是么,
</pre>
<pre id="bbb"></pre>
<button>提交</button>
</div>
<script>
$(function(){
var content = $('#aaa').html();
$('button').click(function(){
content = content.replace(/ /g, "<span></span>")
content = content.replace(/ /g, "<span></span>")
$('#bbb').html(content);
})

})
</script>
</body>
</html>
原文地址:https://www.cnblogs.com/wangqiao170/p/6590446.html