试试这个: http : //jsfiddle.net/FpRp2/4/
(已更新,现在可以在ie7中使用)
@Marcel提供的解决方案使用虚线边框代替文本连字符,从而解决了IE7的最终问题。
(请注意,到目前为止,我仅在Safari,Firefox和Chrome中进行过测试。)
编辑:IE8的作品。 正在针对IE7进行修复。
HTML
<div > <div > <div ></div> <span >some label</span> <span >some text</span> </div> <br> <div > <div ></div> <span >some other label</span> <span >some other text</span> </div></div>
CSS
.outer { display: inline-block; *display: inline; zoom: 1; position: relative; clip: auto; overflow: hidden;}.container { position: relative; text-align: right; white-space: nowrap;}.filler { position: absolute; left: 0; right: 0; border-bottom: 1px dashed #333; height: 50%;}.label { background: white; float: left; margin-right: 20px; padding-right: 4px; position: relative;}.text { background: white; padding-left: 4px; position: relative;}


