兩個(gè)div,一上一下,怎么用純CSS讓他們顯示在同一行啊
3 回答
已采納

西蘭花偉大炮
TA貢獻(xiàn)376條經(jīng)驗(yàn) 獲得超318個(gè)贊
<style> ????.box{ ????????width:?100px; ????????height:?100px; ????????background-color:?red; ????????display:?inline-block ????} ????.box2{ ????????width:?100px; ????????height:?100px; ????????background-color:blue; ????????display:?inline-block ????} ????</style> </head> <body> ????<div?class="box">div1</div> ????<div?class="box2">div2</div>
添加回答
舉報(bào)
0/150
提交
取消