我想使内部div的背景与外部div边界保持一致,但即使没有边界半径,它们之间也有一个很小的空间.
It's not very obvious on the code snippet which is why I included this screenshot:
这是可以解决的问题吗?我还没有发现有人有同样的问题,Firefox和Chrome中似乎都有这种情况.
#outer{
height: 5rem;
width: 10rem;
background-color: red;
border: 2px solid blue;
border-radius: 1rem;
overflow: hidden;
}
#inner{
background-color: blue;
height: 2rem;
width: 100%;
}
#somecontent{
height: 3rem;
width: 100%;
}
<div id="outer">
<div id="inner">
</div>
<div id="somecontent"></div>
</div>