猿问

如何让两个div固定宽度并排居中,自适应屏幕宽度

https://img3.mukewang.com/5c4eaab300019a1603280536.jpg

白衣染霜花
浏览 574回答 1
1回答

ibeautiful

<div id="div0"><div id="div1">asdasd</div><div id="div2">asdasd</div></div>#div0{&nbsp; text-align: center;}#div1, #div2{&nbsp; width: 400px;&nbsp; height: 200px;&nbsp; background: red;&nbsp; display: inline-block;}#div2{&nbsp; background: green;}
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答