在此线程中查看三十点的答案,以获得不带Javascript的纯CSS / HTML解决方案,该解决方案可在 包括IE 6在内的 所有浏览器中使用。
HTML:
<div id="container"> <div ></div> <div ></div> <div ></div> <div ></div> <span ></span></div>
CSS:
#container { border: 2px dashed #444; height: 125px; text-align: justify; -ms-text-justify: distribute-all-lines; text-justify: distribute-all-lines; min-width: 612px;}.box1, .box2, .box3, .box4 { width: 150px; height: 125px; vertical-align: top; display: inline-block; *display: inline; zoom: 1}.stretch { width: 100%; display: inline-block; font-size: 0; line-height: 0}.box1, .box3 { background: #ccc}.box2, .box4 { background: #0ff}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)