Vertical Text with jQuery
问题 I'm looking to vertically align text by adding <br /> tags between characters with jQuery. <div id="foo"><label>Vertical Text</label></div> would look like this: V e r t i c a l T e x t 回答1: Let's go golfing! $('#foo label').html($('#foo label').text().replace(/(.)/g,"$1<br />")); Completely untested, but the pattern in the regex looks like a boob. 回答2: Mr Kurt's answer works well for a single id, but if you want something more useful that can be applied to several elements try something like