我注意到由於本地化排印錯誤導致的此問題 - 翻譯結束時留有空間,導致意想不到的效果。我轉載它in the following fiddle:如果第一個跨度有最後一個字符空間,間距之間的奇怪間距
<style>
.label {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: #ffffff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
background-color: #d9534f;
text-transform: uppercase;
}
</style>
<div>
<p>Label with last character space</p>
<span class="label">Label </span>
<span>some text</span>
</div>
<div>
<p>Label without space</p>
<span class="label">Label</span>
<span>some text</span>
</div>
標籤類是從Twitter的引導3.1.1版拍攝。
您能否幫我理解爲什麼span最後一個字符空間會粘到下一個字符空間,但是當空間從內部移除時它會恢復正常?
@PeeHaa:是的,我再次閱讀的問題,打消了我的意見,而你寫你一個。 – panther