我無法解釋我的DIV的間距。你可以嗎?! 它看起來像exactly like this。儘管邊距和填充爲零,但爲什麼我的DIV之間會有間距?
<div id="bottom">
<div class="shortInfo wide">Lorem.</div>
<div class="shortInfo narrow">Ipsum.</div>
<div class="shortInfo narrow">Dolor.</div>
</div>
#bottom div {
background-color: #ee82ee;
margin: 10px;
padding: 10px;
}
#bottom .wide {
width: 358px;
}
#bottom .narrow {
width: 200px;
}
#bottom .shortInfo {
background-repeat: no-repeat;
padding-left: 10px;
display: inline-block;
}
在你的小提琴中http://jsfiddle.net/Chamster/cE8BG/1/'#bottom div'有'margin:10px;',除了刪除之外,你所需要做的就是擺脫白色空間',就像這樣http://jsfiddle.net/cE8BG/6/ – Arbel
@Arbel我發佈了帶**邊緣的小提琴**,但在問題中我放入了**不是**的問題。儘管設置了0px,我仍能獲得空間**。另外 - downvoters:照顧精心製作? –
可能因爲目前還不清楚。基於評論和評論投票,發佈的問題與jsfiddle之間存在脫節。重現問題的最小代碼應該包含在問題本身中。 – jmoerdyk