CSS 使包装 div 内的两个 div 等距
请在此处查看我的代码。我想做的事情看起来很简单。我试图使紫色框中的两个框(一黄一绿)等距。因此,我希望从紫色框的左边框到绿色框的左边框的间距等于绿色框的右边框和黄色框的左边框之间的距离,这也与黄色框的右边框到紫色框的右边框。
我完全没有想法,但我想我已经很接近了。
感谢您对此提供的任何帮助!
埃文
Please view my code HERE. What I am trying to do is quite simple, so it seems. I am trying to make the two boxes (one yellow, one green) in the purple box equidistant. So, I want the spacing from the purple box's left border to the green box's left border to be equal distance between the green box's right border and the yellow box's left border, which will also be equidistant to the space between the yellow box's right border to the purple box's right border.
I am all out of ideas, but I think I am close.
Thank you for any help with this!
Evan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在左侧框上使用
float: left
,在右侧框上使用float: right;
: http://jsfiddle.net/feeela/D6MUq/38/You can use
float: left
on the left box andfloat: right;
on the right box: http://jsfiddle.net/feeela/D6MUq/38/这看起来不错:
This looks pretty good: