我已经解决了一些问题。例如,我有两个宽度恒定的块和display: inline-block
(http://jsfiddle.net/mgs8jLwk/)。我该如何强迫左手留在最前面?抱歉,如果它与某些问题重复。
PS有没有办法在不注释html标记中的空格的情况下制作两列或更多列?
将“ vertical-align:top;
”用于“ #one
” div。
#one {
display: inline-block;
width: 50px;
height: 50px;
background: blue;
vertical-align:top; /*FIX ADDED*/
}
<!-- COMMENT-->
在DIVS之间删除空间:font-size:0;
在父元素中添加“ ”:
#wrapper {
margin: auto;
width: 300px;
font-size:0;
}
这里有一些其他选项可以消除内联块元素之间的空间:http : //css-tricks.com/fighting-the-space-between-inline-block-elements/
希望这会有所帮助!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句