私には 3 つの親があり、未定義の数の子が含まれます (親はフローティングです)。子は相対的です。スキームは次のようになります。
-----Parent----- ------Parent------ ----Parent----
| Child | | Child | | Child |
| Child | | Child | | Child |
| Child | | Child | | Child |
| Child | | Child | --------------
---------------- -------------------
マウスオーバーすると、子はより大きな高さにサイズ変更されますが、オーバーラップさせたいので、親を拡張したくありません。
私のcssは次のようになります:
.parent{
position:relative;
float:left;
width:296px;
background-color:pink;
margin-right:10px;
}
.child{
position:relative;
height:60px;
margin-bottom:10px;
background-image:url("../images/theme_test.png");
}
上、Y 位置を使おうとしましたが、うまくいきません。