<分区>
<分区>
我已经在 stackoverflow 中搜索了其他解决方案,但不幸的是没有找到。如果我的问题已经存在答案,那么我深表歉意,请将答案链接给我 :)
无论如何我必须 divs 但显示:inline-block;不管用。我希望它们在不使用 float 的情况下彼此相邻。我如何实现这一目标?我一定在这里遗漏了一些东西..
这是 jsfiddle - https://jsfiddle.net/frxme8z8/
在此先感谢大家!
.context {
box-sizing: border-box;
width: 50%;
padding: 10px;
background: #72ED80;
font-family: 'Source Sans Pro', sans-serif;
display: inline-block;
height: 200px
}
最佳答案
只需将您的 .context
宽度设置为 49 %
.context {
box-sizing: border-box;
width: 49%;
padding: 10px;
background: #72ED80;
font-family: 'Source Sans Pro', sans-serif;
display: inline-block;
height: 800px
}
<div class="context"></div>
<div class="context"></div>
关于html - 显示 : inline-block not working. 如何让它工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33413243/