效果
代码:
通过伪类的方式在content里面加点。然后定位在文字的下面。
<head>
<style>
.wavy {
position: relative;
}
.wavy:before {
content: "."; position: absolute; top: 10px; left: 2px;
}
</style>
<script src='js/jquery.min.js'></script>
<script>
$(document).ready(function () {
var text = $(".text").text();
var arr = [];
for (var i = 0; i < text.length; i++) {
arr.push(text.charAt(i));
}
console.log(arr)// 把每个文字都拆分开来放在数组里。["在", "我"