首页 > 为什么给span添加个button span内容居中?不添加就置顶部?结果是form右浮动造成的如何清除浮动?

为什么给span添加个button span内容居中?不添加就置顶部?结果是form右浮动造成的如何清除浮动?

<button>按钮</button><span>这是span</span><form ><select></select></form>

form是浮动靠右的,把button移除后 span内容不能垂直居中?如何清除浮动


http://www.zhangxinxu.com/wordpress/2015/08/css-deep-understand-vertical-align-and-line-height/
建议看看这篇文章,很多这类对齐都是由于内联元素的vertical-align和line-height引起的

【热门文章】
【热门文章】