如果我写“12345test”输出为“1 2 3 4 5 t e s t”,如何添加间距
这是我的代码
<input type="text" placeholder="Write something"
id="testInput" value=""
onFocus="getElementById('test').innerHTML=getElementById('testInput').value;datum();"
onKeyUp="getElementById('test').innerHTML=getElementById('testInput').value;">
<div style="z-index: 2; position: absolute; left: 10px; top: 100px; height: 29px; width: 400px; color: black; font-weight: bold; font-size: 26;">
<span id="test"></span>
</div>
非常感谢!
答案 0 :(得分:1)
您可以在CSS中使用letter-spacing
属性:
...
letter-spacing: 5px; /* will separate each character by 5 pixels */
...